{assign var=i value=1}
{foreach $allDetection as $row}
<tr class="textcenter" >
    <td>
        <!--<input type="text" id="itr"  value="{$i}"  />-->
        <input class="wds100 textcenter" id="detectiontitle{$i}" name="editnameval" value="{$row->title}"/>
    </td>
    <td>
        <input class="wds100 textcenter" id="detectionvalue{$i}" name="" value="{$row->detectionval}"/>
    </td>
    <td>
        <a class="editdetectiontype" id="editdetectiontype" data-itr="{$i}"  data-dtname="{$row->title}"  data-id="{$row->id}" >حفظ  التعديل </a>
    </td>
    <td>
        <a class="deleteelement" data-id="{$row->id}" data-link="visits" data-fun="deldetection"><i class="fa fa-close"></i></a>
    </td>
</tr>
{capture assign=i}{$i+1}{/capture}
{/foreach}