how can i create array using for loop in php
how can i create array using for loop. my code show error. here is my code.
    
`

    <?php if(!empty($_POST['sec_num'])){
    $count = (int)$_POST['sec_num'];
    for($counter=1;$counter<=$count;$counter++){	
    $sec[] = array("counter"=>$counter);?>								
    <tr>
    <td>section name <?= $counter;?></td>
    <td><input type="text" name="<?php $sec['counter'];?>" value=""/>
    </tr>
    <?php }}?>

`
how can i create array using for loop in php
===

how can i create array using for loop. my code show error. here is my code.
    
`

    <?php if(!empty($_POST['sec_num'])){
    $count = (int)$_POST['sec_num'];
    for($counter=1;$counter<=$count;$counter++){	
    $sec[] = array("counter"=>$counter);?>								
    <tr>
    <td>section name <?= $counter;?></td>
    <td><input type="text" name="<?php $sec['counter'];?>" value=""/>
    </tr>
    <?php }}?>

`