I can't figure out why this snippet of code isn't working :facewall: any ideas?
$productref = $order_detail[$i][2]; //#2 is the product ID
$orderqty = $order_detail[$i][3]; //#3 is the SKU #
The Array:
$order_detail array
0 array
id_order_detail string = 1
product_id string = 7
product_qtantity string = 1
reference string = 1021400
This array is the result of a mysql query.
Any help is appriciated. Thank you!!!!!
Here is the entire function if needed
function BuildQueryString($order_id, $order_detail)
{
$num = sizeof($order_detail);
$i=0;
$count=1;
$baseURL = "OrderNumber=$order_id";
while ($i < $num)
{
$productref = $order_detail[$i][2]; //#2 is the product ID
$orderqty = $order_detail[$i][3]; //#3 is the SKU #
/*$productref = "&SKU0$count=$productref&";
$orderqty = "Qty0$count=$orderqty";*/
$sku = "&SKU0$count=$productref&";
$qty = "Qty0$count=$orderqty";
$prodURL = $prodURL . $sku . $qty;
$i++;
$count++;
}
return $baseURL . $prodURL;
}