Skip to content

Instantly share code, notes, and snippets.

@ghazal
Created October 8, 2015 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghazal/36d21acd9d821acc9cb5 to your computer and use it in GitHub Desktop.
Save ghazal/36d21acd9d821acc9cb5 to your computer and use it in GitHub Desktop.
<?php
$db = JFactory::getDBO();
$query = "SELECT * FROM #__categories WHERE section = 1";
$db->setQuery($query);
$list = $db->loadObjectList();
foreach ($list as $item) {
$item_title = $item->title;
echo $item_title.'<br />';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment