Jump to content


Photo

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


  • Please log in to reply
1 reply to this topic

#1 ev66

ev66
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 06 September 2006 - 02:13 PM

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

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 06 September 2006 - 02:18 PM

There's is_numeric, but it includes decimal points and what not. You can use preg_match('/^\d+$/', $string);
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users