var_dump help needed.
- by acctman
The coding below seperates the $state data, I need help putting the var_dump info into $dat1 $dat2 and $dat3 where needed
if($en['country'] == 'US'){
if ($_POST['locus'] == ''){$err .= 'Please select and fillin your locale.<br>';}
$state = $_POST['locus']; // separate: NEW YORK, NY 10011
preg_match("/(.*)\,\s+([A-Z]{2})\s+([\d]+)/", $state, $parts);
var_dump($parts);
} elseif($en['country'] == 'CA'){
if ($_POST['locca'] == ''){$err .= 'Please select and fillin your locale.<br>';}
$state = $_POST['locca']; // separate: PARADISE, NL A1L1P1
preg_match("/(.*)\,\s+([A-Z]{2})\s+([\S]+)/", $state, $parts);
var_dump($parts);
} elseif($en['country'] == 'GB'){
if ($_POST['locuk'] == ''){$err .= 'Please select and fillin your locale.<br>';}
$state = $_POST['locuk']; // separate: LONDON, H9
preg_match("/(.*)\,\s+([\S]{2})/", $state, $parts);
var_dump($parts);
}