重複の可能性:
SimpleXML で属性を取得するには?
高さ、長さ、重さ、幅の値を取得するにはどうすればよいですか? 属性があるから?他の値では、取得に問題はありません。この値だけに属性があります。
注:高さ、長さ、重さ、幅の部分だけが問題です
取得方法は次のとおりです。
$from_amazon = array(
'asin' => $item->ASIN,
'product_name'
=> $item->ItemAttributes->Title,
'image' => $item->SmallImage->URL,
'price' => $item->ItemAttributes->ListPrice->FormattedPrice,
'product_description'
=> $item->EditorialReviews->EditorialReview->Content,
'category' => $item->ItemAttributes->ProductGroup,
'weight' => $item->ItemAttributes->PackageDimensions->Weight
);