3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array('james','Brandun','test'), array('james0','Brandun0','test0'), array('james1','Brandun1','test1') ); function displayLocation( $array, $position){ foreach ($array as $subArray) { $value = $subArray[$position]; array_push($anotherArray,$value); } return $anotherArray; } $temp = displaylocation($array,0); print_r($temp); ?>

preferences:
37.08 ms | 402 KiB | 5 Q