PHP help -- displaying mutiple rows
<p>I am fetching some data from a database like this</p>

<pre><code>$sql ="SELECT * FROM table WHERE field1 LIKE '%$name%'";
</code></pre>

<p>And the result of this is many rows, how can i display all the rows using PHP?</p>

<p>If its just for one row i am using this:</p>

<pre><code>$sql ="SELECT * FROM table WHERE field1 LIKE '%$name%'";       
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
$abc_output= "Data Fetched &lt;br /&gt;";      
$abc_output .="name: " . $row['name'] . "&lt;br /&gt;" ;
$abc_output .="age: " . $row['age'] . "&lt;br /&gt;" ; 
$abc_output .="sex: " .  $row['sex'] . "&lt;br /&gt;" ; 
$abc_output .='&lt;a href="abc.com"&gt; Back to Main Menu&lt;/a&gt;';
 }
echo $abc_output;
</code></pre>

<p>How can i display for multiple rows?</p>
