Displaying Data

Discussion in 'PHP' started by jonathandey, Oct 6, 2010.

  1. #1
    
    <?
    $query = mysql_query("SELECT * FROM general WHERE NOT vidurl = ''");
    	while($select = mysql_fetch_object($query)){
    	$watchList = $select->readby;
    	$list = explode(", ", $watchList);
    	$uList = array_unique($list);
    ?>
    <table border="1" width="800px" style="margin-bottom:75px;">
    	<tr>
    		<td colspan="10">
    			<h1>
    				Website Watch List For Issue: <? echo $select->issue; ?> 
    			</h1>
    		</td>
    	</tr>
    	<tr>
    		<td>
    			Name
    		</td>
    		<td>
    			Video
    		</td>
    		<td>
    			Times Watched
    		</td>
    	</tr>
    <?
    		for($a=0;$a<count($uList);$a++){
    			$u = $list[$a];
    			$g = mysql_fetch_object(mysql_query("SELECT * FROM members WHERE uid = '$u'")) or die(mysql_error());
    ?>
    <tr>
    	<td>
    		<? echo $g->fname . " " . $g->lname; ?>
    	</td>
    	<td>
    		<? echo $select->link; ?>
    	</td>
    	<td>
    		<? 	
    		$thearray = array_count_values($list);
    			krsort($thearray);
    		
    		foreach ($thearray as $key => $val) { 
    			if($key == $u){
    				echo $val;
    			}
    		}
    		?>
    	</td>
    </tr>
    <? } ?>
    </table>
    <? } ?>
    <br />
    <br />
    
    PHP:
    I basically want this to align like

    Table h1 title
    Name Link Value
    Name1 Link1 Value1

    Etc...

    Sorry for the vagueness didn't really know how to explain it.
     
    Last edited: Oct 6, 2010
    jonathandey, Oct 6, 2010 IP
  2. jonathandey

    jonathandey Active Member

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    Problem Solved.
     
    jonathandey, Oct 6, 2010 IP
  3. HuggyEssex

    HuggyEssex Member

    Messages:
    297
    Likes Received:
    4
    Best Answers:
    2
    Trophy Points:
    45
    #3
    Have you got the solution to how you fixed it? Will help others who find this thread through searches.

    Glen
     
    HuggyEssex, Oct 6, 2010 IP