Home > Backend Development > PHP Tutorial > PHP determines the character type PHP determines the value as an integer

PHP determines the character type PHP determines the value as an integer

WBOY
Release: 2016-07-29 08:33:12
Original
1773 people have browsed it

<code><span>//  is_numeric检测变量是否为数字或数字字符串</span><span>if</span>(is_numeric(<span>$intPoints</span>) === <span>TRUE</span> && (int)<span>$intPoints</span> == <span>$intPoints</span>){
    <span>echo</span><span>"这是整数"</span>;
}<span>else</span>{
    <span>echo</span><span>"不是整数"</span>;
}</code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces PHP's judgment of character type. PHP's judgment value is an integer, including the content of PHP's judgment of character type. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template