post the result values in an array
<p>I have used the following code to display the previous and after years of current year.</p>

<pre><code>&lt;?php
$year = date(Y);
$endyear = $year + 10;
$startyear = $year - 10;
for ($i = $startyear; $i &lt;= $endyear; $i++)
{
    echo $i;
}
?&gt;
</code></pre>

<p>I want to put the resulting values of <code>$i</code> in an array. How can I do that?</p>
