php looping array - html table -


i have array of n elements, of form:

array (     array ("foo", "bar"),     array ("foo", "bar"),     array ("foo", "bar")... ) 

i loop on array , display them on html table.

<? $bigarray = array( array("foo", "bar"), array("foo", "bar"), array("foo", "bar") ); ?> <table> <? foreach($bigarray $a) { ?>     <tr><? for($j=0; $j <= 5; ++$j) { ?><td><?= $a[$j] ?></td><? } ?></tr> <? } ?> </table> 

the advantage of approach can prototype favorite html editor , plug commands in. note works when server supports short_tags.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -