printing an array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey there all


Im sure that someone out there can answer this question..

I have a problem, how can I print each element in an array so that is
returned into a table?


eg
<table width="100%"
<th width="25%" nowrap>
Test1
</th>
<th width="25% nowrap>
Test2
</th>
<th width="25% nowrap>
Test3
</th>
<th width="25%">
Test4
</th>

<?php
include("common.inc");
$link_id = mysql_connect($dbhost, $username, $password)
	or die ("Connection Failed");

mysql_select_db($db);
$query = "select Routine_Tests_Count from CDT_Routine_Tests where Ref_num =
'$ref_num'
		order by Routine_Tests_Link;

$result = mysql_query($query, $link_id)
	or die ("Query on $dbhost failed);

while ($row = mysql_fetch_object($result)) {
	print "<td>$row->CDT_Routine_Count</td>";            <--------------- (This
value holds the Results of test1 test 2 etc
													that I need to print into the table)
	}
mysql_free_result($result);

?>
</table>

Any help with this or direction would be appreciated !

Regards
Chris



--------------------------------------
Chris Grigor
--------------------------------------



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux