This shows you the differences between two versions of the page.
uphp:functions:is_array [2017/03/27 20:52] jeff |
uphp:functions:is_array [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======is_array====== | ||
- | < | ||
- | |||
- | Return 1 if the variable is an array | ||
- | |||
- | ====Description==== | ||
- | <well size=" | ||
- | <span style=" | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | |||
- | Check if a variable or value is an array | ||
- | |||
- | ====Parameter==== | ||
- | < | ||
- | |||
- | ====Return Value==== | ||
- | 1 (true) if array, 0 (false) if not an array | ||
- | |||
- | ====Examples==== | ||
- | <code php> | ||
- | <? | ||
- | $x=1; | ||
- | print(is_array($x)); | ||
- | $y=array(" | ||
- | print(is_array($y)); | ||
- | ?> | ||
- | </ | ||
- | |||
- | ====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: | ||
- | |||
- | [[array()]] - Create an array with values | ||