So it the first item i can echo a 0 in the second a 1 the third a 2 and so on...
i want to have that number on the place of the

{foreach from=$albums item=cur_album}
var Slides{$cur_album->id}=[]
{foreach from=$cur_album->PicCont item=onepicture}
Slides{$cur_album->id}[ ??? ] = ["{$onepicture->picture}", "{$onepicture->comment}"];
{/foreach}
{/foreach}
EDIT:
found it.
using this:
{foreach from=$albums item=cur_album}
{assign var=tempid value=0}
var Slides{$cur_album->id}=[]
{foreach from=$cur_album->PicCont item=onepicture}
Slides{$cur_album->id}[{$tempid}] = ["{$onepicture->picture}", "{$onepicture->comment|escape:'html'}"];
{assign var=tempid value=$tempid+1}
{/foreach}
{/foreach}