Core Function isVarArray

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "= isArray( $variable ) = === Description === Checks if a variable is an array type. === Parameters === ==== variable ==== The variable to check. === Return Value === Succe...")
 
(isArray( $variable ))
Line 1: Line 1:
 
= isArray( $variable ) =
 
= isArray( $variable ) =
 +
 +
<pre>
 +
isArray( $variable )
 +
</pre>
  
 
=== Description ===
 
=== Description ===

Revision as of 04:01, 9 November 2011

Contents

isArray( $variable )

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) )
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox