Skip to content

Instantly share code, notes, and snippets.

@artemrogov
Created September 2, 2015 10:29
Show Gist options
  • Save artemrogov/3f32958f061f90488847 to your computer and use it in GitHub Desktop.
Save artemrogov/3f32958f061f90488847 to your computer and use it in GitHub Desktop.
вывод категорий и ссылок
function getCategories($param) {
$param = ORM::for_table('categories')->find_many();
return $param;
}
$getCat = array();
$resultCat = getCategories($getCat);
echo '<ul>';
foreach($resultCat as $itemCat) {
echo '<li><a href =templates/getcatart.php?categories='.$itemCat['id_category'].'>'.$itemCat['cat_name'].'</a></li>';
}
echo '</ul>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment