Arne,

Your code worked fine for me.  I just removed the while and output 4 lines
code like:

    echo "{visitor}  " .
         "{29}  " .
         "{home}  " .
         "{31}  " .
         "{2}" .
         "\n";
    echo "{visitor}  " .
         "{29}  " .
         "{home}  " .
         "{31}  " .
         "{2}" .
         "\n";
    echo "{visitor}  " .
         "{29}  " .
         "{home}  " .
         "{31}  " .
         "{2}" .
         "\n";
    echo "{visitor}  " .
         "{29}  " .
         "{home}  " .
         "{31}  " .
         "{2}" .
         "\n";

And the result was:

{visitor}  {29}  {home}  {31}  {2}
{visitor}  {29}  {home}  {31}  {2}
{visitor}  {29}  {home}  {31}  {2}
{visitor}  {29}  {home}  {31}  {2}

That was using a CLI PHP interface though.

I notice that you are using   though, if this is a web environment,
you need to use a web linefeed which is <br/> as \n's are ignored in a web
environment.


> Bogus Bill wrote:
>
> This did not work for me.  I am running 1.4.1, and am using PHP on my
> website.  I want to give a list of scores, each separated by a linefeed.
> Here is a code snippet:
>
> while($row = mysql_fetch_array($result, MYSQL_ASSOC))
> {
>     echo "{$row['visitor']} &amp;nbsp;" .
>          "{$row['visitor_score']} &amp;nbsp;" .
>          "{$row['home']} &amp;nbsp;" .
>          "{$row['home_score']} &amp;nbsp;" .
>          "{$row['quarter']}" .
>          "\n";
> }
>
> The lines still run together.
>
> Thanks for your help.
>
> Bill Rigdon



Reply via email to