[ create a new paste ] login | about

Link: http://codepad.org/6n20ooMy    [ raw code | output | fork ]

PHP, pasted on Apr 7:
1
2
3
4
5
6
7
8
9
10
11
<?php

    $array = array(1, 2, 3, 4, 5);

    var_dump(each($array));

    foreach ($array as $item) {
      echo "$item\n";
    }

    var_dump(each($array));


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
array(4) {
  [1]=>
  int(1)
  ["value"]=>
  int(1)
  [0]=>
  int(0)
  ["key"]=>
  int(0)
}
1
2
3
4
5
bool(false)


Create a new paste based on this one


Comments: