I am delving into trying to understanding how the MVC structure works. I am following a tutorial and a little bit down the page where is is explaining the Controller class and how it initiates the Model and View there is some code there that does not quite look right to me:

$this->$model =& new $model;
$this->_template =& new Template($controller,$action);

I am refering to the =& in particualr. It seems to me that the website itself may be html encoding the '&' symbol when the page is rendered but I just want to check.

I have seen =& before but not =&

I have googled and have not been able to get much on it so i am assuming that it is meant to be =&

Recommended Answers

All 2 Replies

Yes, it is an encoding problem and should =&. It's an older construct to assign a reference.

Thought so just wanted to make sure

Thanks :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.