I know that this may be duplicated but I can't really find any answer... Why is the $nInd variable undefined the lines after the start of the for loop?
  <?
                $nMaxDetailesArrSize=count($ArrDetailInfo);
                for($nInd=0;$nInd<$nMaxDetailesArrSize;$nInd++)
                  {
            ?>
                  <tr>
                    <td width="5%">
                         <input type="hidden" ID="hidPurDetID" name="hidPurDetID[]" value="<?=$ArrDetailInfo[$nInd]['PurInvDetID_Ind']?>">
                         <input type="hidden" ID="hidPrtID" name="hidPrtID[]" value="<?=$ArrDetailInfo[$nInd]['PrtID_FK']?>">
                         <input class="form-control input-xs" data-mand='y' id="txtPrtNum" name="txtPrtNum[]"   type="text" value="<?=$ArrDetailInfo[$nInd]['PrtNum']?>" <?=$strReadOnly?> />
                   </td>
 
    