array_keys( ) returns an array of all the keys in that array : array_keys « Data Structure « PHP






array_keys( ) returns an array of all the keys in that array

 
array array_keys ( array arr [, mixed search [, bool strict]] )
<?
    $users[923] = 'T';
    $users[100] = 'S';
    $users[1202] = 'C';
    $userids = array_keys($users);


    $users[923] = 'T';
    $users[100] = 'S';
    $users[1202] = 'C';
    $userids = array_keys($users, "T");
?>
  
  








Related examples in the same category

1.Outputting Using array_values() and array_keys() for Backward Compatibility
2.Return all the keys of an array with array array_keys (array input [, mixed search_value])
3.array_keys() function returns an array containing all keys