simple for loop help needed in php
<p>I have 568 rows in my csv file and my for loop looks like this</p>

<pre><code>$csv = array();
$file = fopen('names.csv', 'r');

while (($result = fgetcsv($file)) !== false)
{
    $csv[] = $result;
}

fclose($file);

for ($row = 0; $row &lt; 568; $row++)
{
echo "Serial no:&lt;br/&gt;";
echo "Name:".$csv[$row][1]."";
}
</code></pre>

<p>I want the output like this...</p>

<pre><code>Serial no: 1
Name: Blah blah 1
Serial no: 2
Name: Blah blah 2
............
............
Serial no: 10
Name: Blah blah 10
</code></pre>

<p>For each 10 rows i want serial 1 to 10.. Once it finished 10 rows i want a horizontal line..</p>

<p>I mean i want to print </p>

<pre><code>echo "&lt;hr&gt;";
</code></pre>

<p>For every 10 rows..</p>

<p>Can anyone help me?
Thanks</p>
