Well you could do something like this:

while ($row = mysql_fetch_array) {
  echo "<tr><td>$row[data1]</td></tr>"
}

This will print out a table row for every record.. Now if you just want to
print specific records then you might as well do that in the select
statement to your database and then use the above...

Cheers!

Rick

"The glory of friendship is not the outstretched hand, nor the kindly smile,
nor the joy of companionship; it is the spiritual inspiration that comes to
one when he discovers that someone else believes in him and is willing to
trust him with his friendship."  - Ralph Waldo Emerson

> From: "Tyler Durdin" <[EMAIL PROTECTED]>
> Date: Thu, 25 Jul 2002 19:01:34 +0000
> To: [EMAIL PROTECTED]
> Subject: [PHP] printing results from mysql fetch array
> 
> If I select all from my db how can I print the individual results? For
> example, say i want to print record number 16 from the firstname column into
> a table. How can i accomplish this? I have all of my db access coded and
> have it selecting all from the db, but i want to print individual records
> into my table. Can I set the records to variables and use something like
> <?php echo {whatever would go here} ?> I am really lost here please help!
> 
> 
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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

Reply via email to