Re: [PHP] Normalized Numbers
- From: neuhauser@xxxxxxxxxx (Roman Neuhauser)
- Date: Sun, 14 Jan 2007 17:15:40 +0000
# 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
.
- References:
- Re: [PHP] Normalized Numbers
- From: Roman Neuhauser
- Re: [PHP] Normalized Numbers
- From: "Brian P. Giroux"
- Re: [PHP] Normalized Numbers
- Prev by Date: RE: [PHP] Stripslashes
- Next by Date: Re: [PHP] Stripslashes
- Previous by thread: Re: [PHP] Normalized Numbers
- Next by thread: Re: [PHP] Normalized Numbers
- Index(es):
Relevant Pages
|