User Tools

Site Tools


uphp:functions:array_keys

This is an old revision of the document!


array_keys

WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0

Return keys for an array that has key/value pairs

Description

array array_keys ( array $array )
Return an array object

Parameters

An array with key/value pairs

Return Value

An array of keys

Example

<? 
$arr=array();
$arr['name']="John";
$arr['age']=30;
$arr['status']=1;
$keys=array_keys($arr);
print_r($keys);
 
/* output will be:
p0 = ARRAY
STRING 0 => name
STRING 1 => age
STRING 2 => status
*/
?>

See Also

array() - Create an array with values

array_key() - Return the key for an array index

sizeof() - Return the number of elements in an array

print_r() - Dump the contents of an array to the current output

uphp/functions/array_keys.1487666204.txt.gz · Last modified: 2021/09/13 05:56 (external edit)