Core Function isVarArray
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "= isArray( $variable ) = === Description === Checks if a variable is an array type. === Parameters === ==== variable ==== The variable to check. === Return Value === Succe...")
Newer edit →
(Created page with "= isArray( $variable ) = === Description === Checks if a variable is an array type. === Parameters === ==== variable ==== The variable to check. === Return Value === Succe...")
Newer edit →
Revision as of 11:16, 7 November 2011
Contents |
isArray( $variable )
Description
Checks if a variable is an array type.
Parameters
variable
The variable to check.
Return Value
Success: Returns 1. Failure: Returns 0 if parameter is not an array variable.
Remarks
Can be useful to validate array/non-array parameters to user-defined functions.
Example
$var1 = array(1, 2, 3, 4) $var2 = "Hello" println( "Var1: " . isArray($var1) ) println( "Var2: " . isArray($var2) )