I need a little assistance with the STD class objects.
$checking_w_products = explode("-",$orderline_val->products[$x]->sku);
if(count($checking_w_products)>1)
{
if($checking_w_products[0]=="W")
{
$orderline_val->products[$x] = (object) array(
'sku '=>$checking_w_products[1]
);
}
else
{
$orderline_val->products[$x] = (object) array(
'sku '=>'ahmad'
);
}
}
echo $orderline_val->products[$x]->sku;
die;
I am trying to update the product sku but somehow it is not doing so..It just keeps the value of
$orderline_val->products[$x]->sku
as it is without updating it. I used [this]:How to set attributes for stdClass object at the time object creation example too but no effect...
If you can then please guide me how can I update the value of
$orderline_val->products[$x]->sku;
Thanks