Why can't I filter results on the attribute value rather than the index?
Something like this fails.
foreach ($portfolio->clientGroup[$id]->client['name=foo']->src as $src) {
echo $src . '<br />';
}
But this works.
foreach ($portfolio->clientGroup[$id]->client[0]->src as $src) {
echo $src . '<br />';
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…