php - Is it possible to fill a table with values in column wise? -
is possible fill table values in column wise. example
<?php echo "<table>"; ($j=0;$j<6;$j++) { echo "<tr>"; ($i=0;$i<6;$i++) { echo "<td>".$j.$i."</td>"; } echo "</tr>"; } echo "</table>"; ?>
the output becomes
00 01 02 03 04 05 10 11 12 13 14 15 20 21 22 23 24 25 30 31 32 33 34 35 40 41 42 43 44 45 50 51 52 53 54 55
but wanted table
00 10 20 30 40 50 01 11 21 31 41 51 02 12 22 32 42 52 03 13 23 33 43 53 04 14 24 34 44 54 05 15 25 35 45 55
i came condition not changing values fill in table. (altering echo $j.$i $i.$j brings appearance wanted fill data in column wise). how become possible?
without going details of js issues, php wrong (which should able see if looked @ html php generating):
echo '<li value"'.$i.'" id="'.$i.'" onclick=loadxmldoc("'.$i,$variable.'")>'.$i.'</li>';<br>
should more this:
echo '<li value="'.$i.'" id="'.$i.'" onclick="loadxmldoc(\''.$i.'\',\''.$variable.\''")>'.$i.'</li><br>';
Comments
Post a Comment