PHP: Is_numeric returns false on 0

Posted by Industrial on Stack Overflow See other posts from Stack Overflow or by Industrial
Published on 2010-05-05T15:15:40Z Indexed on 2010/05/05 15:18 UTC
Read the original article Hit count: 131

Filed under:
|
|
|
|

Hi everyone,

Is_numeric() as well as is_int() returns false if the value is 0. What can i do instead to verify that a specific value is numbers only in PHP?

Are we heading straight for the Regular Expressions camp, or are there some nice, handy feature for this out there already?

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about integer