Jump to content

SIMPLE TABLE PROBLEM


pablo1988

Recommended Posts

Can anybody see how to fix the table below. My results are being stacked horizontally rather than vertically. I have attached a picture for you to see what I mean.

 

Thanks

 

 

//SKILL - query  the database table

$sql="SELECT Skill_Name, Rating FROM resource_skill ln

inner join skill n on ln.Skill_ID = n.Skill_ID

WHERE ln.Resource_ID=" . $contactid;

 

//SKILL - run  the query against the mysql query function

$result=mysql_query($sql) or die(mysql_error() . '<br />' . $sql);

echo "<table id=skill>";

echo "<tr>";

echo "<th>Skill</th>";

echo "<th>Rating</th>";

echo "</tr>";

 

//create  while loop and loop through result set

while($row=mysql_fetch_array($result)){

$Skill_Name=$row['Skill_Name'];

$Rating=$row['Rating'];

 

   

//display the result of the array

echo  "<ul>\n";

echo "<td>" . ""  .$Skill_Name . " <td>" . $Rating .  "</td></td>\n";

echo "</ul>";

 

}

 

}

 

echo "</tr>";

echo "</table>";

 

 

 

 

 

 

 

?>

post-133092-13482403402938_thumb.png

Link to comment
https://forums.phpfreaks.com/topic/260808-simple-table-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.