Skip to content

Instantly share code, notes, and snippets.

@artemrogov
Created September 2, 2015 10:27
Show Gist options
  • Save artemrogov/c5465301f14ba38fe72e to your computer and use it in GitHub Desktop.
Save artemrogov/c5465301f14ba38fe72e to your computer and use it in GitHub Desktop.
тут выводятся статьи соответсвующей категории
if (isset($_GET['categories']) ){
$categories = $_GET['categories'];
}
function getCatArticle($param,$categories) {
$param = ORM::for_table('articles')->where('id_category', $categories)->find_many();
return $param;
}
$dataArticle = array();
$viewArticles = getCatArticle($dataArticle,$categories);
foreach($viewArticles as $iemArticle) {
echo $iemArticle['name_articles'].'<br>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment