php code to check whether value is a number code example
Example: php check if string or number
<?php if (is_numeric("cake")) { echo "Yes"; } else { echo "No"; } ?>
<?php if (is_numeric("cake")) { echo "Yes"; } else { echo "No"; } ?>