Issue
I fetched the result with query in cakephp in controller and save it in a variable when i echo the variable in view it display only "Array".No data is displayed so how to solve it?
Solution
Given:
$var = $this->Model->find('first', array('conditions'=>array('Model.id'=>$id)));
try using:
var_dump($var);
or
print_r($var);
or perhaps even better:
debug($var);
to see the result of your query.
Answered By - savedario Answer Checked By - Mary Flores (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.