Usage

Object Syntax: obj.type();
Returns the type of the variable.

Explanation

Returns the type of the variable.

-1 = non-existant
0 = float
1 = string
2 = object
3 = array

Example

function onCreated() {
  temp.variable1 = "foo";
  temp.variable2 = {"bar", "baz"};
  
  echo("temp.variable1 is type "@ temp.variable1.type());
  echo("temp.variable2 is type "@ temp.variable2.type());
}

... Will echo 1 and then 3, as temp.variable1 is a string while temp.variable2 is an array.

Categories

CategoryFunctionClientside
CategoryFunctionServerside
Comments [Hide comments/form]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki