Re: Normalized Numbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# 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

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux