I have this code:

$a = array ('zero','one','two', 'three');

foreach ($a as &$v) {

}

foreach ($a as $v) {
  echo $v.PHP_EOL;
}

Can somebody explain why the output is:
zero one two two .

From zend certification study guide.

9 Answers
9

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *