有一个这样的数组:
Array
(
[0] => stdClass Object
(
[url] => https://is0.Z0V.jpg
[width] => 370
[height] => 370
)
[1] => stdClass Object
(
[url] => https://is1.et/derived_pi0V_300x300.jpg
[width] => 300
[height] => 300
)
[2] => stdClass Object
(
[url] => https://is1.n100x100.jpg
[width] => 100
[height] => 100
)
[3] => stdClass Object
(
[url] => https://is1.t/dZ0V_36x36.jpg
[width] => 36
[height] => 36
)
)
我如何只从这个 foreach 中获取 [2] 并将其插入:
foreach($fotoSuggSizes as $fotoSuggSize100)
{
$image_urlSugg100[] = array("urlx100"=>$fotoSuggSize100->url);
}