Re: Normalized Numbers

From: Date: Sun, 14 Jan 2007 17:15:40 +0000
Subject: Re: Normalized Numbers
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-247071@lists.php.net to get a copy of this message
# bpg@senecal.ca / 2007-01-14 10:49:49 -0500: > > 1 function is_valid_ean($ean) { > > 2 return (13 == strlen($ean) > > 3 && is_numeric($ean) > > 4 && (0 == (digit_sum($ean,1,1,3) % 10)) > > 5 ); > > 6 } > > Again, WOW! This is certainly the version I will use (if you don't mind). Not at all. Also see my other post in this thread, I made more changes to your code, you're welcome to use anything you find useful. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991

« previous php.general (#247071) next »