 {assign var=x value=1}
{foreach $productdata as $myproductdata}
<input type="text" name="{$itr}serialnumber{$x}" value="{$myproductdata->serialnumber}" />
 {capture assign=x}{$x+1}{/capture} 
{/foreach}
<input name="serailcount{$itr}" type="hidden" value="{$serailcount}">
