<?php
$valores = [[
'vl_valor' => '123',
'vl_valorreal' => '123',
'referente' => '2018-11'
],
[
'vl_valor' => '456',
'vl_valorreal' => '456',
'referente' => '2018-11'
]];
function reorganizaArray($arr) {
$arrOrganizado = [];
for ($i = 0; $i < count($arr); $i++) { $temp = [];
foreach ($arr[$i] as $key => $value) {
$temp[$key] = $value;
}
$arrOrganizado[] = $temp;
}
return $arrOrganizado;
}
PD9waHAKCSR2YWxvcmVzID0gW1sKICAgICAndmxfdmFsb3InID0+ICcxMjMnLAogICAgICd2bF92YWxvcnJlYWwnID0+ICcxMjMnLAogICAgICdyZWZlcmVudGUnID0+ICcyMDE4LTExJwogICAgXSwKICAgIFsKICAgICAndmxfdmFsb3InID0+ICc0NTYnLAogICAgICd2bF92YWxvcnJlYWwnID0+ICc0NTYnLAogICAgICdyZWZlcmVudGUnID0+ICcyMDE4LTExJwogICAgXV07CiAgICAKICAgIHZhcl9kdW1wKHJlb3JnYW5pemFBcnJheSgkdmFsb3JlcykpOwogICAgCiAgICBmdW5jdGlvbiByZW9yZ2FuaXphQXJyYXkoJGFycikgewogICAgCSRhcnJPcmdhbml6YWRvID0gW107CiAgICAJZm9yICgkaSA9IDA7ICRpIDwgY291bnQoJGFycik7ICRpKyspIHsKICAgIAkJJHRlbXAgPSBbXTsKICAgIAkJZm9yZWFjaCAoJGFyclskaV0gYXMgJGtleSA9PiAkdmFsdWUpIHsKICAgIAkJCSR0ZW1wWyRrZXldID0gJHZhbHVlOwogICAgCQl9CiAgICAJCSRhcnJPcmdhbml6YWRvW10gPSAkdGVtcDsKICAgIAl9CiAgICAJcmV0dXJuICRhcnJPcmdhbml6YWRvOwogICAgfQ==