is_array(variable);
Argument | Description |
---|---|
variable | The variable to check. |
Returns: Boolean
This function can be used to check and see if a variable holds
an array (it will return true) or not (in which case it
will return false).
if is_array(a)
{
a = 0;
}
The above code checks a variable to see if it is an array, and if the function returns true, the array is deleted.