refiking Posted July 1, 2009 Share Posted July 1, 2009 I get a $player_user variable in the form of $_GET and I need to check to see if there are any digits in it. How can I go about doing that? Link to comment https://forums.phpfreaks.com/topic/164325-solved-how-to-check-string-for-digits/ Share on other sites More sharing options...
celsoendo Posted July 1, 2009 Share Posted July 1, 2009 Try: $player_user = $_GET['player_user']; if (ereg("[0-9]*", $player_user)) { print "Digits found!"; } Link to comment https://forums.phpfreaks.com/topic/164325-solved-how-to-check-string-for-digits/#findComment-866838 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.