Home >Backend Development >PHP Tutorial >PHP and JS determine whether a string is a number

PHP and JS determine whether a string is a number

WBOY
WBOYOriginal
2016-07-29 09:07:091496browse

PHP and JS determine whether a string is a number

1. PHP: is_numeric() function, if it is a number or a numeric string, it returns true, otherwise it returns false

2. JS: isNaN() function, if If it is a number, it will return false, if it is not, it will return true

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces PHP and JS to determine whether a string is a number, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn