I am using http://www.nonumber.nl/extensions/sourcerer in order to place some custom php code in an article to display all my registered users in the front end of my Joomla 3.3 site. I am new to this so appreciate any help.
The code does work however it displays the users all in one long line with no breaks and is very difficult to read,
like this:
id|username|email|id|username|email|id|username|email|... etc
Can somebody explain how I take a new line after each user, for example:
id|username|email|<br>
id|username|email|<br>
id|username|email|<br>
I have tried adding \n
and other variations in single and double quoted but it won't seem to make any difference.
My code is below:
$db = JFactory::getDBO();
$query = "SELECT * FROM #__users" ;
$db->setQuery($query);
$rows = $db->loadObjectList();
foreach ($rows as $row) {
echo $row->id.'|'.$row->username.'|'.$row->email;<br>
}
Thanks