View Single Post
Old 06-21-2005, 04:07 AM   #2 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 734
DJMaze is on a distinguished road
you can't forget the first, you can forget the last though.

If you want to forget the function must work differently like blah($array)

& means you send the data as reference (pointer), If you don't use & the data gets copied.
Code:
<?php

function blah($var) {
    $var = 'no reference';
}
function ref(@$var) {
    $var = 'reference';
}

$a_var = 'a string';
blah($a_var);
echo $a_var;

ref($a_var);
echo $a_var;
this will output:
Code:
a string
reference
DJMaze is offline   Reply With Quote