On Sun, 28 Apr 2002, Christian Ista wrote:
> <?php
>     for ($i = 0; $i<mysql_num_rows($result); $i++)
>   {
>    echo mysql_result($result,$i, "NAME");<br>
>   }
> ?>
> 
> Could you tell me how I can do to have a <br> after each row.

Two options:

   {
     echo mysql_result($result,$i, "NAME") . '<br>';
   }

or:

   {
     echo mysql_result($result,$i, "NAME");
     ?><br><?
   }

In the first one, the string <br> was added onto the end of whatever else 
echo was outputting.

In the second one, we temporarily switch back from PHP to HTML, output the 
<br> tag, then switch back to PHP.

miguel


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

Reply via email to