Sorry I am not very good in object and
I want to do something like that :
$this->countries =new stdclass;
$this->countries->id =array();
$this->countries->name =array();
$query = $db
->getQuery(true)
->select('name,id')
->from('#__country');
$rows = $db
->setQuery($query)
->loadObjectList();
foreach ($rows as $row) {
$this->countries->id = $row->id;
$this->countries->name = $row->name;
}
foreach ($this->countries as $country):
echo $country->id;
echo $country->name;
endforeach;
I receiv this error : Notice: Trying to get property of non-object I don't know why it dont work
Thanks