Jump to content

Displaying Results In A Table?


nishmgopal

Recommended Posts

Hi guys, I was wondering how I can display my output in a nice html table so it is easy to read. 

 

The code:

 

$query1 = "SELECT * FROM Job_ID WHERE Job_Name ='$_SESSION[Job_Name]'";

  $result2 = mysql_query($query1)
       or die ("Couldn't execute query.");

while ($row2=mysql_fetch_array($result2)){

  		$Job_ID1=$row2['Job_ID'];
		}


	////
$sql2="SELECT * FROM ID_Table WHERE Job_ID IN (SELECT Job_ID FROM Job_ID WHERE Job_ID=$Job_ID1)";
   $result3 = mysql_query($sql2)
           or die ("Couldn't execute query.");
   
    while ($row3=mysql_fetch_array($result3)){
   
            $Skill_Name[]=$row3['Skill_Name'];
            $Weight[]=$row3['Weight'];
          }
$sep = '';
$sid_list = '';
foreach ($Skill_Name as $sid) {
  $sid_list .= "$sep$sid";
  $sep = ','; 
}
$sid_list .= '';

{
$sep1='';
foreach ($Weight as $wei){
$sid_list1 .= "$sep1$wei";
$sep=',';

}
$sid_list1 .= '';

?>

<?php echo $_SESSION[Job_Name]?> Requires
<?php echo "$sid_list , at level $sid_list1";

 

I want to split the table in rows of $sid_list and $sid_list1.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/149390-displaying-results-in-a-table/
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.