can someone please help me with this? I have gotten it this far to create the rows, td's and blank td's when there is no data. but i cant make it output the information from the array.
any help would be greatly appreciated!
<?php
$data = array( array( user => "john doe",
email => "john@example.com"
),
array( user => "jan doe",
email => "jan@example.com"
),
array( user => "bill doe",
email => "bill@example.com"
),
array( user => "phill doe",
email => "phill@example.com"
),
array( user => "frank doe",
email => "frank@example.com"
)
);
$results = count($data);
echo "<table border=\"1\">";
for ($Counter=0; $Counter<$results; ) {
echo "<tr>";
for ($ColCount=0; $ColCount<4 AND $Counter<$results; $ColCount++,$Counter++) {
echo "<td>{$data['user']}</td>";
}
if ($Counter == $results) {
for ($Extra = ($results % 4); $Extra<4 AND $Extra!=0; $Extra++) {
echo "<td>-</td>";
}
}
echo "</tr>";
}
echo "</table>";
?>