PHP skills - more and more firms are displaying data
Sample code:
<? Php
Echo "<table width=100% border=1 cellspacing=0 cellpadding=4> \ n";
$ Curcol = 0; / / current out
$ Percol = 7; / / each line 7
$ Fixcol = 0; / / repair cells
For ($ i = 1; $ i <= 30; $ i + +) (
$ Curcol + +;
If ($ curcol% $ percol == 1) echo "<tr> \ n";
Echo "<td> row $ i </ td> \ n";
If ($ curcol% $ percol == 0) echo "</ tr> \ n";
)
If ($ curcol% $ percol! = 0) (
For ($ fixcol = 1; $ fixcol <= (percol-$ $% $ percol curcol); $ fixcol + +) (
Echo "<td> </ td> \ n";
)
)
If ($ fixcol> 1) echo "</ tr> \ n";
Echo "</ table> \ n";
–>
Achieve results:
Row1 row2 row3 row4 row5 row6 row7 row8 row9 row10 row11 row12 row13 row14 row15 row16 row17 row18 row19 row20 row21 row22 row23 row24 row25 row26 row27 row28 row29 row30
Tags: PHP








0 Comments to “PHP skills - more and more firms are displaying data”
No Comments. Send your comment.
Leave a Reply
You must be logged in to post a comment.