apparently the ampersand means to treat $link as a reference, not as
an optional argument:
http://www.softwareprojects.org/php-functions-12.htm
I think the way to do it would be to set a default value in your
function so that if a value is set by the calling statement that
would override it
D A GERM wrote:
I'm throwing a warning on a function I created. I
thought a & in front of the argument was supposed to
make it optional. Is there something else I need to do
make that argument optional?
The ampersand does not make it optional. It passes it by reference...
http://us2.php.net/ma
I'm throwing a warning on a function I created. I
thought a & in front of the argument was supposed to
make it optional. Is there something else I need to do
make that argument optional?
//I simplified the code
function doEmail($username, &$link)
{
if (isset($link))
{
print "$link $user
3 matches
Mail list logo