For this example, I have a db table that has id, name for the fields and has 5 rows
I do this query
Code: Select all
$query = mysql_query("select * from table1 where id='4'");
$tables = mysql_fetch_array($query);
foreach( $tables as $name )
{
echo "<br>".$name;
}Code: Select all
4
4
Name4
Name4