Reputation: 899
i got this object:
SimpleXMLElement Object\n(\n
[@attributes] => Array\n (\n
[article_number] => 550007\n )\n\n
[serial_number] => Array\n (\n
[0] => 5500070000126237\n
[1] => 5500070000126246\n
[2] => 5500070000126255\n
[3] => 5500070000126264\n
[4] => 5500070000126273\n )\n\n)\n
I want to access the attribute like this , but it doesn't seem to work:
foreach ($product_array as $codes)
{
error_log($codes->product[0]->attributes()->article_number);
}
Upvotes: 0
Views: 74