is_string(value) returns true if value is a string.
PHP is_string() function has the following syntax.
is_string(value)
PHP is_string() function returns true if value is a string.
Is it a string.
<?php
$values = array(2, "2", 2.5, "2.5", null, true);
foreach ($values as $value) {
echo "is_string(";
var_export($value);
echo ") = ";
var_dump(is_string($value));
}
?>
The code above generates the following result.