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