Anonymous - Tue, 17/05/2011 - 14:53

Permalink

For values less than 10, this routine doesn't work, as the $second_last_digit will always be the same as $last_digit due to the way PHP works.

$second_last_digit = substr($number, -2, 1);

If the string in only one character, it will return that character, which then breaks your logic.

CAPTCHA