vaibhavjha
(Vaibhavjha)
1
I have a custom function in my controller. I want to quickly check the value passed to the $temp variable. Can anyone suggest how I can do so?
public function actionOffence()
{
$data=Vehicle::model()->findByPk((int) $_POST['vehicleId']);
$temp=$data->type;
}
Keith
(Kburton)
2
What do you mean by "check the value"?
rhomb
(Jan)
3
I’ll take a guess here and assume you just want to retrieve the content of the variables, to check for debugging purposes.
var_dump($temp);
should do the trick.
For ease of reading / debugging I would suggest:
CVarDumper::dump($temp, 3, 1);
especially when dumping objects the cvardumper is really useful