php - change array output with changing value -
so have table value $i
column counts/labels each row (goes 1 12).
i have array add, table column. trying do, have array change value outputting each time $i
value changes.
this sort of looks coding:
<?php $i=1; $myarray= array('one', 'two', 'three', 'etc...') ?> <center> <?php echo'<table width="100%">'; echo '<tr>'; echo '<th></th>'; echo '<th>country</th>'; echo '<th>greeting</th>'; echo '<th>translation</th>'; echo '<th>language</th>'; echo '</tr>'; $number_of_rows = 11; ($row = 0; $row <= $number_of_rows; $row++) { echo '<tr>'; echo '<td >'. $i++ . '</td>'; echo '<td >'. “blue” . '</td>'; echo '<td >'. “red” . '</td>'; echo '<td >'. “green” . '</td>'; echo '<td >'. “black” . '</td>'; echo '</tr>'; } ?> </center>
i'm quite new php, it's bit confusing me. sorry mistakes.
this i'm bit stuck. want row says "green" row going implement array. each row different, $i value different each row. however, i'm not quite sure how implement current set have going? there way can it? or have take different route?
thanks.
Comments
Post a Comment