Hi all,
maybe this is a stupid Q, but lately I'm diving into OOP. Below you can see a piece of
example code from the manual.
my Q: what does the & sign do in functioncb_modify( &$item,$key) ??
I noticed this sign is used more, so it should be handy, but hwat does it do?
thx Wilbert
-----------------------------
class mod {
var $thearray;
function mod( $a ) {
$this->thearray = $a;
}
function cb_modify( &$item, $key ) {
$item = "pref_".$item;
}
function modify() {
array_walk( $this->thearray, array( $this, 'cb_modify' ) );
}
}
$m = new mod(array("one","two","three"));
$m->modify();
print_r($m);
which prints out:
mod Object
(
[thearray] => Array
(
[0] => pref_one
[1] => pref_two
[2] => pref_three
)
)
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-------------------------