Ugh.
We've got to find how your system registers line breaks.
So, try this function at the bottom of
x-cart_root/include/func/func.db.php instead:
Code:
function getPONum($o_details) {
if (strpos($o_details, "PO Number") > -1) {
$o_string = preg_replace("/\r\n|\n|\r/", " ", $o_details);
$po_number_arr = explode(' ',$o_string);
for ($int=0; $int<count($po_number_arr); $int++) {
if ((strpos($po_number_arr[$int], "PO") > -1)&&(strpos($po_number_arr[$int + 1], "Number") > -1)) {
$po_num = $po_number_arr[$int + 2];
break;
}
}
return $po_num;
} else {
return "";
}
}
Does that do it? I hope so!