I need to get the status of the following associative array array:
array (size=2)
0 =>
array (size=9)
'idnovedades' => string '1' (length=1)
'idGarantias' => string '329' (length=3)
'numeroOperacion' => string '329' (length=3)
'saldoAdeudado' => string '10000.00' (length=8)
'montoGarantia' => string '1000000.05' (length=10)
'saldoVencido' => string '12132.11' (length=8)
'diasMora' => string '132131' (length=6)
'observaciones' => string '321321qawasdadasda' (length=18)
'estado' => string '1' (length=1)
1 =>
array (size=9)
'idnovedades' => string '2' (length=1)
'idGarantias' => string '329' (length=3)
'numeroOperacion' => string '329' (length=3)
'saldoAdeudado' => string '3.29' (length=4)
'montoGarantia' => string '3.29' (length=4)
'saldoVencido' => string '2.39' (length=4)
'diasMora' => string '239' (length=3)
'observaciones' => string '239assadasd' (length=11)
'estado' => string '1' (length=1)
For this I used this code:
foreach ($registros['data'] as $key => $value) {
unset($registros['data'][$key]['estado']);
}
return $registros;
It works, it works, but I wanted to know if there is a PHP method that solves this in a more efficient way or if I leave it like this.