Idea: Structure field index

This would be a great shortcut way to output the current index (e.g. 1,2,3) of a structure field.

<? $sizes = $page->sizes()->toStructure() ?>
<? foreach ($sizes as $item): ?>

    <?=$item->index()?>

<? endforeach; ?>

Yes it could be done with a for ($x = 0; ... but I think those are ugly.

Alternatively you can try something like this:

<? $sizes = $page->sizes()->toStructure() ?>
<? foreach ($sizes as $index => $item): ?>

    <?= $index ?>

<? endforeach; ?>

Less ugly than a for loop