3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( array('james','Brandun','test'), array('james0','Brandun0','test0'), array('james1','Brandun1','test1') ); function displayLocation( $array, $position){ foreach ($array as $subArray) { for ($i=0; $i < count($subArray); $i++) { $anotherArray = $subArray[$i]; } } return $anotherArray; } print_r(displaylocation($array,0)); ?>
based on bmpKh
Output for 4.3.0 - 7.2.0
test1