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).
is_array(n);
Argument | Type | Description |
---|---|---|
n | Any | The variable to check. |
if (is_array(a))
{
a = -1;
}
The above code checks a variable to see if it is an array, and if the function returns true, the array is deleted by setting the variable to -1.