Posted by BSmith001 on October 27, 2008 at 10:51pm
I have a txt box the takes phone numbers, ie: ph, ph, ph as a format.
Now I need to explode them into an array and send each one to the validation module $qlist = explode(",", $QuikList)
if (!validate_phone($qlist)) {
form_set_error('', t('Please provide a valid mobile phone number.'));
}
but, do I need a foreach? I don't seem to be looping thru the array
Comments
...
Try:
$qlist = explode(",", $QuikList)foreach ($qlist as $phone) {
if (!validate_phone($phone)) {
form_set_error('', t('Please provide a valid mobile phone number.'));
}
}