Created
April 12, 2011 02:01
-
-
Save joshuapowell/914778 to your computer and use it in GitHub Desktop.
Check if a value is a number, if it is print it out and keep going, other wise return FALSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Check if a value is a number, if it is print it out and keep going, other wise return FALSE | |
* | |
* @param (string) $number | |
* @return (mixed) boolean/$number | |
*/ | |
function is_number($number) { | |
if (is_numeric($number)) { | |
return $number; | |
} | |
return FALSE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment