Hey, I'm having some trouble with my for statement here.
how would I get this code re-formatted so that it looks like this
category :- consultant....
right now its coming out with all the categories in a line, and then all the consultants, but I need them to do it one at a time.
echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\">";
echo "<tr><td><span class=published-header>$area1</span><span class=published-text> - $project_address ($project_type)</span></td></tr><tr><td>";
$detailIDNew = explode(",", $detailID);
$catIDNew = explode(",", $catID);
for ($p=0; $p<sizeof($catIDNew); $p++)
{
$sql4 = "SELECT * FROM category WHERE category.catID='$catIDNew[$p]'";
$result4 = mysql_query($sql4);
$owners = mysql_fetch_array($result4);
$category=$owners['catSelect'];
echo "<span class='bodytext'>$category </span>";
}
for ($i=0; $i<sizeof($detailIDNew); $i++)
{
$sql4 = "SELECT * FROM projectdata_details WHERE projectdata_details.projID='$detailIDNew[$i]'";
$result4 = mysql_query($sql4);
$owners = mysql_fetch_array($result4);
$consultant=$owners['description'];
echo "<span class='bodytext'>:- $consultant</span><br>";
}
echo"</td>";
echo"</tr><br><br>";