> if ((int($string)==($string)) && ($string>0)) {then positive integer}
> 
> not sure exactly, but try


Why not use the RE's? I usually use preg_* so I'll give the example
using these...


if (preg_match ("/^\d+$/", $string)) {
  print ("Yep... Only digits.");
} else {
  prnt ("Noop! There are non-digit characters...");
}

-- 

* R&zE:


-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to