Code:
preg_match('/(USPS|UPS)\s+?(Postal|Ground|Priority)\s/i',$page,$matched);
if (isset($matched[1])) {
$shipper = $matched[1];
}
if (isset($matched[2])) {
$shipping_method = $matched[2];
}
I want $shipping_method to be redeclared as 'USPS Priority' if it is previously declared as 'Postal' I made the below if statement to redeclare it but it is basically declaring it no matter what, even if it was original declared 'Ground'. I know I am missing something really simple. Any help? Programmer is offline and wanted to get this done tonight.
I added
Code:
if ($shipping_method='Postal')
{
$shipping_method='Priority Mail';
}