You almost had it, you had to use a loop to get the results to get each row, and as you do, assign each row to the table.
The following is what you are looking for.
$result = mysql_query("SELECT * FROM vttest"); while($row = mysql_fetch_assoc($result)){ $rows[] = $row; }
Then, all you need to do to access this array is the following.
foreach($rows as $index => $value){ print_r($value); }
The preview will print each line in your array one at a time, allowing you to cut or use this data as you wish.
source share