Yii Framework
$this->render (' index ', array (' list ' = $list));
What is the meaning?
Beginner, help, thank you very much ~
------Solution--------------------
$this->render (' index ', array (' list ' = $list));
Index refers to a view
The array (' list ' = $list) is the name $list the new list variable or array to the index view.
------Solution--------------------
The index.php page is displayed, and the value $list, the difference and the renderpartial,renderpartial only render the partial view. A beginner like you, working together
------Solution--------------------
My understanding is that the render index template passes the value $list to index, and if there are more values, it can be passed as an element of the array, as
$this->render (' index ', array (' list ' = $list, ' name ' = = $arr _names));
------Solution--------------------
References:
My understanding is that the render index template passes the value $list to index, and if there are more values, it can be passed as an element of the array, as
$this->render (' index ', array (' list ' = $list, ' name ' = = $arr _names));
$list the array variable to the index template $name.
------Solution--------------------
It seems that the user of the YII framework is still very active.
------Solution--------------------
Passing in the list parameter to the index view, you can use the $list variable directly in index and render the output at the same time.
------Solution--------------------
Render is a call to layout to render a view and display it.
There is also a renderprtial that shows a view directly, that is, layout is not called.
The landlord tried to know.
------Solution--------------------
Two values in parentheses, the first is your view page, the second array is to pass the value, key is the value you upload to the page, value is the value you get in the controller,