diff --git a/functions/var.xml b/functions/var.xml index 98c146385e..f8d6efbdac 100644 --- a/functions/var.xml +++ b/functions/var.xml @@ -903,8 +903,8 @@ if (!odbc_execute ($stmt, &$sqldata)) { Description - int settype - string var + boolean settype + mixed var string type @@ -915,6 +915,7 @@ if (!odbc_execute ($stmt, &$sqldata)) { Possibles values of type are: + "boolean" "integer" "double" "string" @@ -925,6 +926,18 @@ if (!odbc_execute ($stmt, &$sqldata)) { Returns true if successful; otherwise returns false. + + + <function>settype</function> example + +$foo = "5bar"; // string +$bar = true; // boolean + +settype($foo, "integer"); // $foo is now 5 (integer) +settype($bar, "string"); // $bar is now "1" (string) + + + See also gettype.