You mean something like:
<?php
//setup db connection
$usr = "username";
$pwd = "yourpass";
$db = "yourdatabase";
$host = "localhost";
$cid = mysql_connect($host,$usr,$pwd);
if (!$cid) { echo("ERROR: " . mysql_error() . "\n"
; }
$SQL = "SELECT name, owner, species FROM pet";
$retid = mysql_db_query($db, $SQL, $cid);
if (!$retid) { echo( mysql_error()); }
$n = "1"; //count
while ($data = mysql_fetch_array($retid))
{
$data[$n] = $data;
$n++;
}
var_dump($data);
?php>
This puts everything into an array, then dumps it all. You could easily just put an eco inside the WHILE instead. You can also do like:
echo $data["name"];
inside the WHILE, which will only echo the name column on each loop.
If you need more help, let me know.