while/foreach/for get 3 results at a time?
<p>I am trying to get 3 results out of a mysql database at a time (so it would display 3 at a time)</p>

<p>So it would be something like</p>

<pre><code>$sql = mysql_query("SELECT * FROM table");
while ($row = mysql_fetch_array($sql)) {
    print $row['username'];
    print $row['username2'];
    print $row['username3'];
}
</code></pre>

<p>but $row['username']; and $row['username2']; $row['username3']; would just be the first second and third results out of the mysql table.</p>

<p>and then it would repeat and $row['username']; and $row['username2']; and $row['username3']; would be the 4th, 5th and 6th and so on.</p>

<p>Any idea of how I could do this?</p>
