Core Function isVarArray

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
Line 15: Line 15:
 
=== Return Value ===
 
=== Return Value ===
  
Success: Returns 1.
+
Success: Returns true.
  
Failure: Returns 0 if parameter is not an array variable.
+
Failure: Returns false.
  
 
=== Remarks ===
 
=== Remarks ===

Revision as of 10:37, 29 August 2013

isVarArray( $variable )

Contents

Description

Checks if a variable is an array type.

Parameters

variable

The variable to check.

Return Value

Success: Returns true.

Failure: Returns false.

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: " . isVarArray($var1) );
println( "Var2: " . isVarArray($var2) );
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox