<?php $a = array(1,2,3,4); $it = new ArrayIterator($a); foreach ($it as $k => $v) { unset($it[$k]); } var_dump($a);
You have javascript disabled. You will not be able to edit any code.