3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST = [ 'data' => [ 'row_3' => [ 'viagem' => [ 'veiculo_id' => '1', 'motorista_id' => '1', 'data' => '2019-06-05', 'destino' => 'A', 'vrUnit' => '', 'horaSaida' => '00:00:00', ] ] ] ]; echo $_POST['data']['row_3']['viagem']['destino']; echo "\n---\n"; $rowKey = key($_POST['data']); // no need to generate an entire temporary array of keys echo $_POST['data'][$rowKey]['viagem']['destino'];

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
223.94 ms | 2082 KiB | 11 Q