Althoug this works well enough, I am curious if anyone knows of a prettier way of doing this as this situation seems to come up quite often.
<?php
//Initialy, data is nested up in $some_array[0] ...
$some_array = array(array('somevar' => "someValue", "someOtherVar" => "someOtherValue"));
print_r($some_array);
Array ( [0] => Array ( [somevar] => someValue [someOtherVar] => someOtherValue ) )
// Could the following line be achieved a more elegant fashion?
$some_array = $some_array[0];
print_r($some_array);
// Prints the intended result:
Array ( [somevar] => someValue [someOtherVar] => someOtherValue )
Does anyone know of a way to achieve this with a native function or in a more elegant fashion?
Thanks!