On Jul 24, 2003, "Dan Joseph" claimed that:

|Hi,
|
|       Just looking for an opinion on how you would do this...
|
|       Let's say I have a number: 12800001924
|
|       The rules call for removing "1280+", meaning remove 128 and all 0's that
|come after it, until you run into another number.
|
|       In the end, it would leave 1924, and everything else on the beginning would
|be gone.
|
|       How would you setup your logic for this?
|
|-Dan Joseph

If you know that all numbers are the same number of digits, I'd just do
$newNumber = oldNumber - 12800000000;

Otherwise, as the released enlisted man I am, I'd just follow the Captain.

Jeff
-- 
Registered Linux user #304026.
"lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.



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

Reply via email to