Rename Array Keys
<p>I need to change this array's keys to 0-5, why isn't this working?</p>

<pre><code>$arr = array();

while(count($arr) &lt; 6){
    $arr[] = rand(1,53);
    $arr = array_unique($arr);
}
asort($arr);

$i = 0;
foreach($arr as $key =&gt; $value){
    //echo $i;
    $key = $i;
    $i++;
}

print '&lt;pre&gt;';
print_r($arr);
</code></pre>

<p>Thank you</p>
