Return all the keys of an array with array array_keys (array input [, mixed search_value]) : array_keys « Data Structure « PHP






Return all the keys of an array with array array_keys (array input [, mixed search_value])

 
<?
$array = array(0 => 100, "color" => "red");
array_keys ($array); 
$array = array(1, 100, 2, 100);
array_keys ($array, 100); 
?>
  
  








Related examples in the same category

1.Outputting Using array_values() and array_keys() for Backward Compatibility
2.array_keys( ) returns an array of all the keys in that array
3.array_keys() function returns an array containing all keys