Forum Moderators: coopster
12 - 16 - 22 - 29 - 41
15 - 21 - 31 - 47 - 98
01 - 06 - 43 - 44 - 71
etc.
say I wanted to get rid of all strings that consisted of only even/odd numbers. Or get rid of any string where the first two/three/four numbers are consecutive. Or get rid of any strings that have their first number as 1 and their last number as 99. That sort of filtering.
With all the random number/security code generators on the web I'm kind of hoping that there's several good tutorials but I just can't seem to find them.
Thanks
Mike
in the example you posted you can use explode() to create an array or all the numbers
$numbers = explode(" - ", $string);
then it's just a matter of looping through that array and determine with some if-else constructions what the appropriate action is
[edited by: siMKin at 10:36 pm (utc) on Aug. 28, 2006]