Hello
I’m search for the less-effort way to get the first result from a getCollection or getIterator query, without having to write a for each loop.
Usually I write something like:
$boxes = $xpdo->getIterator('Box',array(
'width' => 40,
));
foreach ($boxes as $idx => $box) {
echo "Box #{$idx} has an id of {$box->get('id')} and a width of {$box->get('width')}\n";
}