Re: Normalized Numbers

From: Date: Fri, 12 Jan 2007 10:06:32 +0000
Subject: Re: Normalized Numbers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-246983@lists.php.net to get a copy of this message
Have you checked out the PEAR Validate packages? http://pear.php.net/package/Validate_ISPN in particular might help you along ;) And BTW, most servers are set up to display php files renamed to .phps with syntax highlighting, so give that a try instead of .php.txt next time. Regards, Arpad Brian P. Giroux wrote:
I am just learning PHP and as a practical exercise I've been working on a set of functions to process and manipulate what I call "normalized number" (ISBNs, EANs, UPCs, etc...) My ultimate goal is to create a normnum class and child classes for the different types of numbers. Because of my line of work, I am mostly interested in ISBN-10s, ISBN-13s, EANs and UPCs, but it can also be expanded to credit card numbers, Canadian Social Insurance Numbers, and many more. So far I have functions to validate ISBN-10s and EANs although I've run into a bit of a wall with the digit_sum function as explained in the B: section of that functions header comments. If anyone can help me out with that or provide any other advice about the rest of it, I'd be grateful. The file can be found at http://www.senecal.ca/normnums.php.txt Thanks.


« previous php.general (#246983) next »