Tuesday, 13 August 2013

How to create a URL in Yii using value of a variable

How to create a URL in Yii using value of a variable

I'm using this lines to create a URL for update button.
'url'=>'$this->grid->controller->createUrl("/testSettings/update",
array("id"=>$data->Id,"approval"=>0))'
This works fine as I have hardcoded the value for approval. Now I have to
change this 0 with value of another variable $approval. How can I do this.
i.e I have to give this
'url'=>'$this->grid->controller->createUrl("/testSettings/update",
array("id"=>$data->Id,"approval"=>$approval))'

No comments:

Post a Comment