WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0
Check if a variable is a string
Check to see if a variable or value is of type string
$variable: Variable or expression to be evaluated
Integer: 1 (true) if a string, 0 (false) if not a string
<? $x=1.0; print(is_string($x)); // outputs 0, $x is a float $y="1.0"; print(is_string($y)); // outputs 1, $y is a string $z='' print(is_string($z)); // outputs 1, $z is an empty string ?>
This function checks ONLY the type of the variable, not the data that it holds!
is_int() - Check if a variable is an integer
is_float() - Check if a variable is a float
is_numeric() - Check if a value is numeric (int, float or numeric string)
is_array() - Check if a variable is an array
isset() - Check if a variable exists