PDA

View Full Version : Help trying to understand a few bits of code.


powerful_rogue
05-19-2009, 05:25 PM
Hi,

Im just trying to decipher a piece of code and im getting there slowly! There are however a few bits that im trying to get my head around and was wondering if I were to post them if anyone could just give a brief explanation of what they mean.

$vboptions =& $vbulletin->options;

Now I know that this is a variable and if it didnt have the "&" it would mean that variable $vboptions is the same as $vbulletin->options, however im not sure what it means when it has the "=&" Ive tried searching w3school and also php.net but not having much luck location the "=&"

Dismounted
05-20-2009, 05:59 AM
"=&" means assign the left with the right by reference, instead of by value. This is easy to grasp if you're coming from another programming background, but can be confusing for newcomers.

Also see the PHP site for some explanation. (http://www.php.net/references)

powerful_rogue
05-20-2009, 08:14 AM
Thanks dismounted. I'll have a read up on that.