PHP is_string Function
What is is_string() in PHP?
Explanation
is_string function checks whether the given input value is string or not.
Syntax:
is_string(variable)
Example :
<?php
$val="Hscripts";
if(is_string($val))
{
echo "This is a String Value";
}
else
{
echo "This is not a String Value";
}
?>
Result :
This is a String Value
Check if a variable is a string value using
PHP is_string function.