September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool is_string(mixed value) Tests whether a value is a string.
Returns:
TRUE if the value is a string; FALSE otherwise
Description:
is_string() checks whether value is a string. If so, the function returns TRUE. If not, FALSE is returned.
Availability:
UNIX, Windows
Version:
3+, 4+
See also:
gettype()
Example:
// The quotes around the number force the value to be a string
$value = '99';
if (is_string ($value))
print "Value \$value is a string.";
else
print "Value \$value is not a string.";
|
Read now
Unlock full access