Re: [PHP] Normalized Numbers



# bpg@xxxxxxxxxx / 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
.