Jump to content

Archived

This topic is now archived and is closed to further replies.

ev66

is there a function that............?

Recommended Posts

is there a function that can tell if a string contains only numbers ?
thanks.

Share this post


Link to post
Share on other sites
There's[tt] is_numeric[/tt], but it includes decimal points and what not. You can use[tt] preg_match('/^\d+$/', $string);[/tt]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.