How to avoid 34 overridden by 124 in the following PHP code? I just want to keep the 34 and 124 both.
$arr = array(12, 34, "df"=>43, "1"=>124, 65);
$num = count($arr);
reset($arr);
for ($i = 1; $i <= $num; ++$i) {
echo 'The Current Position:' . key($arr);
echo '<br />';
echo 'The Current Value:'. current($arr);
next($arr);
echo '<br />';
echo '<br />';
}