Code: Select all
function getCategorie()
{
$db = JFactory::getDBO();
$query = "SELECT id,title FROM #__categories ORDER BY title ASC";
$db->setQuery($query);
return $db->loadObjectList();
}
Code: Select all
array(8) {
[0]=>
object(stdClass)#165 (2) {
["id"]=>
string(1) "2"
["title"]=>
string(17) "Ongecategoriseerd"
}
[1]=>
object(stdClass)#195 (2) {
["id"]=>
string(1) "3"
["title"]=>
string(17) "Ongecategoriseerd"
}
}
Fatal error: Cannot use object of type stdClass as array in