} */ $ins_array = array(); $norm_partnumber = preg_replace("/[^\\p{L}\\p{N}]/u", '', $responseDetail[$i]['xsku']); //set up an insert statement $ins_array["xqty"] = $responseDetail[$i]['xqty']; $ins_array["xprice"] = $responseDetail[$i]['xprice']; $ins_array["xmpline"] = $responseDetail[$i]['xmpline']; $ins_array["xline"] = $responseDetail[$i]['xline']; $ins_array["xbran"] = $responseDetail[$i]['xbran']; $ins_array["xfreight"] = $responseDetail[$i]['xfreight']; $ins_array["xcore"] = $responseDetail[$i]['xcore']; $ins_array["xord"] = $responseDetail[$i]['xord']; $ins_array["mhind"] = $responseDetail[$i]['mhind']; $year = substr($responseDetail[$i]['xdate'], 0, 4); $month = substr($responseDetail[$i]['xdate'], 4, 2); $day = substr($responseDetail[$i]['xdate'], 6, 2); $ins_array["xdate"] = $year . "-" . $month . "-" . $day; $ins_array["xinvtotal"] = $responseDetail[$i]['xinvtotal']; $ins_array["xinv"] = $responseDetail[$i]['xinv']; $ins_array["xourpo"] = $responseDetail[$i]['xourpo']; $ins_array["xsku"] = $norm_partnumber; $fieldarray = $dbobject->insertRecord($ins_array); $errors = $dbobject->getErrors(); $i++; echo $i; echo "\r\n"; } } else { echo "getting no response from paAPI"; }