Array into tables with addidtions
I have an multidimentional array that i have placed into a table...
PHP Code:
$count_echo = 0
echo '<tr>'
while($row = mysql_fetch_array($result)){
$count_echo++;
echo "<td>$row[1]</td>";
if ($count_echo > 3) {
echo "</tr>";
echo "<tr>";
$count_echo = 0;
it all works but...??! How would you I add something in the first cell and move everything along a cell?
colspan="x"
lets me place it on top but not inside :(
Re: Array into tables with addidtions
I'm not really 100% sure what you want to do, but this will add a cell before the first cell and move every previous onto the next.
PHP Code:
<?php
$c = 0;
while($row = mysql_fetch_array($result)){
$c++;
if($c == 1){
//this is your first cell.
}else{
//this is any cell but the first cell; do whatever you would do normally
}
if($c > 4) //changed 3 to 4 to include an extra cell.
$c = 0;
}
?>