This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
uphp:functions:is_array [2017/03/09 14:15] jeff created |
uphp:functions:is_array [2021/09/13 05:57] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======is_array====== | ======is_array====== | ||
| + | |||
| < | < | ||
| - | Return 1 if the variable is an array | + | Check if a variable is an < |
| ====Description==== | ====Description==== | ||
| - | <well size=" | + | |
| - | <span style=" | + | <well size=" |
| - | < | + | <span style=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| + | <span style=" | ||
| </ | </ | ||
| - | Return 1 (true) | + | Check to see if a variable |
| - | ====Parameters==== | + | ====Parameter==== |
| - | < | + | |
| - | ====Return | + | < |
| - | 1 if array, 0 if not an array | + | |
| + | ====Return | ||
| + | |||
| + | < | ||
| + | |||
| + | ====Examples==== | ||
| - | ====Example==== | ||
| <code php> | <code php> | ||
| <? | <? | ||
| - | $x=1; | + | |
| - | print(is_array($x)); | + | print(is_array($x)); |
| - | $y=array(" | + | $y=array(" |
| - | print(is_array($y)); | + | print(is_array($y)); |
| ?> | ?> | ||
| </ | </ | ||
| + | |||
| + | ====Notes==== | ||
| + | |||
| + | This function checks ONLY the type of the variable, not the data that it holds! | ||
| ====See Also==== | ====See Also==== | ||
| - | [[is_int()]] - Return 1 if the variable is an integer | ||
| - | [[is_float()]] - Return 1 if the variable is a float | + | [[is_int()]] - Check if a variable is an < |
| + | |||
| + | [[is_float()]] - Check if a variable is a < | ||
| + | |||
| + | [[is_string()]] - Check if a variable is a < | ||
| - | [[is_string()]] - Return 1 if the variable is a string | + | [[is_numeric()]] - < |
| - | [[is_numeric()]] - Return 1 if the value is numeric (integer, float or string) | + | [[isset()]] - Check if a variable exists |
| [[uphp: | [[uphp: | ||
| - | [[array()]] - Create an array with values | + | [[array()]] - Create an < |