Is_numeric ();
$tests = array( "42", 1337, "1e4", "not numeric", array(), 9.1);foreach ($testsas$element) { if (is_numeric($element)) { echo"'{$element}' is numeric", PHP_EOL; } else { echo"'{$element}' is NOT numeric", PHP_EOL; }}?>
Results
'42'is numeric'1337'is numeric'1e4'is numeric'not numeric'isNOT numeric'Array'isNOT numeric'9.1'is numeric
Strtotime ($time)
$time'2015adsasd';var_dump(strtotime($time));$time1'2015-01-11';var_dump(strtotime($time1));
Results
bool(false)int()
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above is to determine whether it is a number, time format, including the content, I hope that the PHP tutorial interested in a friend helpful.