Validate numeric stringLast updated on March 31st, 2009 by Gabriel LivanCheck if a string is numeric or not. <?php function validate_number($string) { if(is_numeric($string)) { return true; } else { return false; } } ?>