php intval empty string code example
Example 1: php string to int
intval($string);
Example 2: php check for empty string
if (empty($var)) {
echo '$var is either 0, empty, or not set at all';
}
intval($string);
if (empty($var)) {
echo '$var is either 0, empty, or not set at all';
}