Code: Select all
SimpleXMLElement Object
(
[@attributes] => Array
(
[stat] => ok
)
[sizes] => SimpleXMLElement Object
(
[@attributes] => Array
(
[canblog] => 0
[canprint] => 0
[candownload] => 1
)
[size] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[label] => Square
[width] => 75
[height] => 75
)
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[label] => Thumbnail
[width] => 100
[height] => 75
)
)
[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[label] => Small
[width] => 240
[height] => 180
)
)
)
)
)
Code: Select all
foreach ($sizes->size as $size)
{
$label = strtolower((string) $size["label"]);
$info["sizes"][$label] = array(
"width" => (string) $size["width"],
"height" => (string) $size["height"]
);
}