is_string

(FW >= 1.0)

is_string - checks if a variable is an integer or float

Description

int is_string( mixed $var )
Returns 1 if the variable is a string, otherwise returns 0

Parameters

var

variable to check

Return Value

returns 1 if the variable is a string

Examples

<? 
$x=1.0;
print(is_string($x)); // outputs 0 since x is a float
$z="cool";
print(is_string($z)); // outputs 1 since z is a string

?>