| Posted by edwardspl on 08/13/05 15:35 
Dear you,
 Now, I want to define a set of array varible with table structure as the
 following:
 
 Result page:
 
 <table>
 <tr>
 <td><? $f1[0];?></td>
 <td><? $f2[0];?></td>
 <td><? $f3[0];?></td>
 <td><? $f4[0];?></td>
 </tr>
 <tr>
 <td><? $f1[1];?></td>
 <td><? $f2[1];?></td>
 <td><? $f3[1];?></td>
 <td><? $f4[1];?></td>
 </tr>
 <tr>
 <td><? $f1[2];?></td>
 <td><? $f2[2];?></td>
 <td><? $f3[2];?></td>
 <td><? $f4[2];?></td>
 </tr>
 </table>
 
 Source page:
 
 <table>
 <tr>
 for($i=1;$i<5;$i++)
 {
 <td><input type=checkbox name='f<? echo $i;?>[]' value='1'></td>
 }
 </tr>
 </table>
 
 Only display the result of zero array, eg :
 f1[0]
 f2[0]
 f3[0]
 f4[0]
 
 So, how to write the source (Web page - when user click the submit
 button) by using loop ?
 [Back to original message] |