The Is_string () PHP function is used to check if a value is a string. This could be used within an if () statement to treat strings in one way and non-strings in another. It will return true or false.
More PHP / MySQL Quick Tips
<?phpThe code above should output "No" because 23 is not a string. Let's try this again:
if (is_string(23))
{
echo "Yes";
} else {
echo "No";
}
?>
<?phpSince "Hello World" is a string, this would echo "Yes".
if (is_string("Hello World"))
{
echo "Yes";
} else {
echo "No";
}
?>

