print "\n";
print "\n";
$counter = 0;
while ($result = mysql_fetch_array($pointer)) {
$counter++;
if ($counter % 4 === 0) {
print "".$result[1]."\n";
print "\n";
print "\n";
} else {
print "".$result[1]."\n";
}
}
// add blank cells if number of cell o
[snip]
this structure prints out a table with a new row for each item
<$results[1] " ;
}
?>
what I want to do is print out a table 4 columns wide and however many
rows
high needed to run through the data
HOW do I loop through the array and get data printed 4 times
then a new row started and
some code snipits would help, but lets see what we can do.
I like arrays, they work for me, there are lots of ways todo things, arrays will help.
echo "{$headline[0]}Latest news blah blah \n";
echo "{$headline[1]}Latest news blah blah \n";
echo "{$headline[2]}Latest news blah blah \n";
3 matches
Mail list logo