The following code illustrates a problem I've got with references (running
on PHP 4.3.2).  Can anyone explain it for me?  Thanks in advance for any
assistance!
Martin

<?php

$globalvariable = 0;
$one = 1;

//want to set up $globalvariable as a reference to $one
setglobal($one);

echo $globalvariable; //prints 0, not 1

function setglobal(&$one)
{
      global $globalvariable;
      $globalvariable =& $one;
}

?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to