Forum Moderators: coopster
I assume its this if statement but I am having trouble working it out:
if (ereg('^4[0-9]{12}([0-9]{3})?$', $this->cc_number)) {
$this->cc_type = 'Visa';
could really do with an explanation of this part if anyone can help(it needs to be able to accept a number such as 4564 5555 5555 5555):
('^4[0-9]{12}([0-9]{3})
thanks
- ^ constrains to beginning of subject/line
- $ constrains to end of subject/line
Tom