[eluser]Mitja B.[/eluser]
Code:
while($row = mysql_fetch_assoc($result))
{
$pool['id'][] = $row['pool_id'];
$pool['date'][] = strtotime($row['pool_date']);
$pool['question'][] = $row['pool_question'];
$pool['answerID'][] = $row['answer_id'];
$pool['answer'][] = $row['answer'];
//$pool['valid'][] = gmdate("d.m.Y", $row['pool_valid']);
$pool['valid'][] = date("d.m.Y",$row['pool_valid']);
$pool['votes'][] = $row['answer_votes'];
$pool['active'][] = $row['pool_active'];
}
i want to add this code inside controller that i will use it in view. I try like this.
Code:
foreach ($query->result() as $row)
{
$data['id'][] = $row['pool_id'];
$data['date'][] = $row['pool_date'];
}
and then i load $data
but i get error of
Fatal error: Cannot use object of type stdClass as array in C:\HTTPSERVER\wwwroot\bewoop\system\application\controllers\admin.php on line 128
how to make this?
Thx