I have written a piece of PHP code to pull info out of my MySQL database. It does this just as expected, the problem is I need the output in 2 columns instead of one. Can anyone help me to get 2 columns out of this:
<?php
if ($hours = "All" || $jobstatus = "Active") {
$db = mysql_connect("localhost", "root");
mysql_select_db("hprhs",$db);
$result = mysql_query("SELECT * FROM joblist ORDER BY jobtype",$db);
if ($myrow = mysql_fetch_array($result)) {
echo "<table align=center border=2>\n";
do {
if ($myrow[jobstatus] == 'Active') {
printf("<tr><td><b>%s</b></td></tr>\n", $myrow["jobtype"]);
printf("<tr><td>%s</td><tr>\n", $myrow[jobtitle]);
printf("<tr><td>%s.<br> %s.<br> %s.</td></tr>\n", $myrow["jobreq"], $myrow["jobdesc"], $myrow["workhours"]);
}
} while ($myrow = mysql_fetch_array($result));