php check if string or number
snippet in php

php check if string or number

user6454

 <?php if (is_numeric(887)) { echo "Yes"; } else { echo "No"; } ?>

php check if string or number

user5902

 <?php if (is_numeric("cake")) { echo "Yes"; } else { echo "No"; } ?>