User Tools

Site Tools


uphp:functions:is_array

This is an old revision of the document!


is_array

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

Return 1 if the variable is an array

Description

int is_array ( mixed $variable )

Check if a variable or value is an array

Parameter

variable: Variable or expression to be evaluated

Return Value

1 (true) if array, 0 (false) if not an array

Examples

<?
  $x=1;
  print(is_array($x)); // outputs 0
  $y=array("one");
  print(is_array($y)); // outputs 1
?>

Notes

This function checks ONLY the type of the variable, not the data that it holds!

See Also

is_int() - Return 1 if the variable is an integer

is_float() - Return 1 if the variable is a float

is_string() - Return 1 if the variable is a string

is_numeric() - Return 1 if the value is numeric (integer, float or numeric string)

isset() - Return 1 if the variable exists

uPHP Variable Types and Limits

array() - Create an array with values

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