Right now, it pulls data from a MySQL database and puts the data (names) in two side-by-side columns. How do I make this 3? I'm no PHP/HTML/CSS expert. It's just supposed to pull the names of the donors from the database and display them, for digital signage purposes.
$sql = "SELECT * FROM donor WHERE DonationAmount = 1000 AND Category = '2' ORDER BY LastName ASC";
$result = mysqli_query($conn, $sql);
$i = 0;
$total_rows = $result->num_rows;
echo "<table><tr>";
if (mysqli_num_rows($result) > 0) {
echo "<p style=font-size:20px;>In Honor Of</p>";
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
// test if the DisplayName field is empty or not
echo "<td>";
if(empty($row['DisplayName']))
{
// it's empty!
if(empty($row['FirstName'])){
echo $row['LastName'];
}
else{
echo $row["LastName"]. ", " . $row["FirstName"];
}
}else{
// Do stuff with the field
echo $row["DisplayName"]. "";
}
echo "</td>";
$i++;
if($i % 2 == 0 && $i != $total_rows) {
echo "</tr><tr>";
}
}
} else {
}
echo "</tr></table>";