Industrial Industrial - 3 years ago 171
PHP Question

PHP: Is_numeric returns false on 0

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!

Answer Source

Restarted PHP on the server and it works out well now. Have no idea of why it occored though. Thanks everybody for their help!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download