In cakephp, I retrieve data from mysql and assign them to an array but i am unable to reuse each element of it in the view.
In the controller i call the model to query data from the database, which have the following format
Array ([0]=>Array([user]=>Array([something]=>somevalue [somethingelse]=>someotherValue))
[1]=>Array([user]=>Array([something]=>somevalue [somethingelse]=>someotherValue))
.......)
and I initilize my ready-to-pass-to-view array as follows, $result is the array obtained from database.
$i=0;
foreach($result as $row)
{
$exportDt[$i]['something']=$row['user'][something];
$exportDt[$i]['somethingelse']=$row['user'][somethingelse];
}
this->set($exportDt);
How can i reuse this exportDt array in the view ? I am thinking that setting is allowed for only one dim array only.