ev66 Posted September 6, 2006 Share Posted September 6, 2006 is there a function that can tell if a string contains only numbers ?thanks. Link to comment https://forums.phpfreaks.com/topic/19904-is-there-a-function-that/ 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] Link to comment https://forums.phpfreaks.com/topic/19904-is-there-a-function-that/#findComment-87122 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.