I’m trying to develop a component for joomla (I’m a begginer) and receive this error:
Parse error: syntax error, unexpected $end in /home/sharesaf/public_html/test/components/com_usersall/models/usersall.php on line 1 .
The thing is i don’t have any unclosed brackets.
This is the code
<?php
defined('_JEXEC') or die();
jimport('joomla.application.component.model');
class UsersallModelUsersall extends JModel{
function getUsers(){
$db =& JFactory::getDBO();
$query = 'SELECT id,username FROM l08sx_users';
$db->setQuery($query);
$users = $db->loadAssocList();
return $users;
}
}
?>
Can you please help me with this problem?
The code you’ve posted is fine – the missing curly bracket must be in code that you’ve added/changed in other files related to the component. Check your views such as view.html.php (and probably default.php) and files in the controllers folder