ev66 Posted September 6, 2006 Share Posted September 6, 2006 is there a function that can tell if a string contains only numbers ?thanks. Quote Link to comment Share on other sites More sharing options...
effigy Posted September 6, 2006 Share Posted September 6, 2006 There's[tt] is_numeric[/tt], but it includes decimal points and what not. You can use[tt] preg_match('/^\d+$/', $string);[/tt] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.