<?php
function mesExtenso($mes){
return [
1 => 'Janeiro',
'Fevereiro',
'Março',
'Abril',
'Maio',
'Junho',
'Julho',
'Agosto',
'Setembro',
'Outubro',
'Novembro',
'Dezembro'
][$mes];
}
$data = [
[
'maquinas' => '111',
'mes' => '1',
'YEAR(data_ordem)' => '2016'
],
[
'maquinas' => '99',
'mes' => '2',
'YEAR(data_ordem)' => '2016'
],
[
'maquinas' => '116',
'mes' => '3',
'YEAR(data_ordem)' => '2016'
]
];
$return = [];
foreach ($data as $key => $value) {
$return[] = [
mesExtenso($value['mes']),
$value['maquinas']
];
}
PD9waHAgCgpmdW5jdGlvbiBtZXNFeHRlbnNvKCRtZXMpewogICAgcmV0dXJuIFsKICAgICAgICAxID0+ICdKYW5laXJvJywKICAgICAgICAnRmV2ZXJlaXJvJywKICAgICAgICAnTWFyw6dvJywKICAgICAgICAnQWJyaWwnLAogICAgICAgICdNYWlvJywKICAgICAgICAnSnVuaG8nLAogICAgICAgICdKdWxobycsCiAgICAgICAgJ0Fnb3N0bycsCiAgICAgICAgJ1NldGVtYnJvJywKICAgICAgICAnT3V0dWJybycsCiAgICAgICAgJ05vdmVtYnJvJywKICAgICAgICAnRGV6ZW1icm8nCiAgICBdWyRtZXNdOwp9CgokZGF0YSA9IFsKICAgIFsKICAgICAgICAnbWFxdWluYXMnID0+ICAnMTExJywKICAgICAgICAnbWVzJyA9PiAgJzEnLAogICAgICAgICdZRUFSKGRhdGFfb3JkZW0pJyA9PiAgJzIwMTYnCiAgICBdLAogICAgWwogICAgICAgICdtYXF1aW5hcycgPT4gICc5OScsCiAgICAgICAgJ21lcycgPT4gICcyJywKICAgICAgICAnWUVBUihkYXRhX29yZGVtKScgPT4gICcyMDE2JwogICAgXSwKICAgIFsKICAgICAgICAnbWFxdWluYXMnID0+ICAnMTE2JywKICAgICAgICAnbWVzJyA9PiAgJzMnLAogICAgICAgICdZRUFSKGRhdGFfb3JkZW0pJyA9PiAgJzIwMTYnCiAgICBdCl07CgokcmV0dXJuID0gW107Cgpmb3JlYWNoICgkZGF0YSBhcyAka2V5ID0+ICR2YWx1ZSkgewogICAgJHJldHVybltdID0gWwogICAgICAgIG1lc0V4dGVuc28oJHZhbHVlWydtZXMnXSksCiAgICAgICAgJHZhbHVlWydtYXF1aW5hcyddCiAgICBdOwp9Cgp2YXJfZHVtcCgkcmV0dXJuKTs=