PHP output array
<p>despite hours of googling and reading various books I can't seem to output what I'm aiming for in the PHP program I'm trying to create (I'm new to this!). Basically, to start off with I just wanted to create a simple array and try to output my favourite football teams and their position or facts about them before I got into anything too complicated (unforunately even this has been somehwat difficult!). This is what I've got thus far: </p>

<pre><code>&lt;?php
    &lt;html&gt;
    &lt;head&gt;
    &lt;title&gt;Football teams&lt;/title&gt;
    &lt;/head&gt;

    &lt;body&gt;
    &lt;?php


    $numbers = array("one", "two", "three", "four");

    $counter = 0;
    do {
        if($counter &gt; 0) {
            $verse = true;
        }
        echo "$numbers[$counter] " ;
        if ($verse) {
            echo "Team " ;
        }
        else {
            echo "Teams" ;
        }
        print "are the best teams in the world &lt;br/&gt;" ;
        $counter++;
    } while($counter &lt; 4);
    $football = $counter;
    while($football) {
        echo "$numbers[$football] men, " ;
        if ($verse) {
            echo "n&lt;br/&gt;" ;
        }
        echo "and rarely lose any games\n\n&lt;br/&gt;&lt;br/&gt;" ; 
        $football--;
    }
?&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>

<p>Now that works without any errors, but it is all over the place and not in the correct order, so I'd appreciate any assistance. Can't see what's wrong myself when there are no errors, so I suspect there is a problem with one of the loops.</p>

<p>Thank you.</p>

<p>I expect to get:</p>

<pre><code>one team are the best team in the world
and rarely lose any games

two teams are the best team in the world
two teams
and rarely lose any games

three teams are the best team in the world
three teams
and rarely lose any games

four teams are the best team in the world
four teams
and rarely lose any games
</code></pre>

<p>etc.</p>

<p>But what I'm getting is:</p>

<pre><code>one team are the best team in the world
two teams are the best team in the world
three teams are the best team in the world
four teams are the best team in the world
</code></pre>

<p>UPDATE:</p>

<pre><code>$counter = 0;
do {
if($counter &gt; 0) {  
$verse = true;     
    }
echo "$numbers[$counter] " ;
if ($verse) {`
       echo "team " ; 
    }
    else {
        echo "teams " ;
    }
    print "are the best teams in the world&lt;br/&gt;" ;
    $football = $counter;
    while($football) {
    echo "$numbers[$football] teams, " ;
    if ($verse) {
        echo "&lt;br/&gt;" ;
    }
    echo "and rarely lose any games\n\n&lt;br/&gt;&lt;br/&gt;" ; 
    $mower--;
}
$counter++;
} while($counter &lt; 10);
?&gt;&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Using this code I've almost accomplished my aim, this is the output I get:</p>

<pre><code>one team are the best team in the world,
two teams are the best team in the world,
two teams,
and rarely lose any games

three teams are the best team in the world,
three teams,
and rarely lose any games

two teams,
and they rarely lose any games,

four teams are the best team in the world,
four teams,
and they rarely lose any games,
</code></pre>

<p><strong>BUT, WHAT I WANT IS THIS:</strong></p>

<pre><code> one team are the best team in the world,
 and they rarely lose any games,

two teams are the best team in the world,
two teams,
and they rarely lose any games,

three teams are the best team in the world,
three teams, two teams,
and they rarely lose any games,

four teams are the best team in the world,
four teams, three teams, two teams,
and they rarely lose any game,
</code></pre>

<p>Thanks if anyone can help!!</p>
