function view($id = null) {
开发者_StackOverflow $this->Post->id = $id;
What is the purpose of ($id = null)?
It uses null
as the default value for the function argument $id
. See Default argument values for the details.
function view($id = null) {
开发者_StackOverflow $this->Post->id = $id;
What is the purpose of ($id = null)?
It uses null
as the default value for the function argument $id
. See Default argument values for the details.
精彩评论