[ create a new paste ] login | about

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

PHP, pasted on Oct 13:
1
2
3
4
5
6
7
8
<?php
$array = array('45','50', '3', '4444');

foreach($array as &$irt){
    $irt = 150;
}

var_dump($array);


Output:
1
2
3
4
5
6
7
8
9
10
array(4) {
  [0]=>
  int(150)
  [1]=>
  int(150)
  [2]=>
  int(150)
  [3]=>
  &int(150)
}


Create a new paste based on this one


Comments: