PHPBuilder - Clumsy quickie on how to format ur td/tr output



RSS Twitter
Tips Html

Clumsy quickie on how to format ur td/tr output

by: Eli BRM
|
October 15, 2001

$count=0;
function output($array,$index)
{
print "<table>";
   foreach($array as $field)
     {
       if($count==0){print "<tr>";}

       print "<td>$field</td>";
    
       if($count==$index){print "</tr>";$count=0;}
     }  
print "</table>";
}

If You need to display a certain number of columns in your output, just pass that number throught $index.

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Eli BRM

Comment:



Comment:

(Maximum characters: 1200). You have characters left.