PHP How to read all the keys or a subset of the keys of an array – PHP April 19, 2011 Pramod T P Leave a comment <?php $testArray = array(1 => 5, "name" => "First Name"); print_r(array_keys($testArray)); //Array ( [0] => 1 [1] => name ) ?>