Re: MYSQL table row styling
First off, you should use echo as little as possible. Just echo your actual variables. That will make your code much cleaner.
Second, what kind of styling are you trying to achieve? It's just outputting a table. Any CSS can be applied.
Third, your loop statment is really bad PHP. You should almost never have to prematurely break a database query unless you've done the query wrong.
Re: MYSQL table row styling
Here's an example of how much cleaner/simpler/efficient your code could be...
PHP Code:
<table cellpadding="10" cellspacing="1" border="0">
<tr>
<th>First</th>
<th>Middle</th>
<th>Last</th>
</tr>
<?php
$start = 0;
$numberOfRows = 50;
$query = "SELECT * FROM clients LIMIT $start, $numberOfRows";
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_object()) {
?>
<tr>
<td><?php echo $row->firstName; ?></td>
<td><?php echo $row->middleName; ?></td>
<td><?php echo $row->lastName; ?></td>
</tr>
<?php
}
}
?>
</table>