User Tools

Site Tools


uphp:functions:is_array

is_array

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

Check if a variable is an array

Description

int is_array ( mixed $variable )

Check to see if a variable or value is of type array

Parameter

$variable: Variable or expression to be evaluated

Return Values

Integer: 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() - Check if a variable is an integer

is_float() - Check if a variable is a float

is_string() - Check if a variable is a string

is_numeric() - Check if a value is numeric (int, float or numeric string)

isset() - Check if a variable exists

uPHP Variable Types and Limits

array() - Create an array, with optional values

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