Skip to content

Instantly share code, notes, and snippets.

@artemrogov
Created September 2, 2015 11:07
Show Gist options
  • Save artemrogov/a13d86603996871b322f to your computer and use it in GitHub Desktop.
Save artemrogov/a13d86603996871b322f to your computer and use it in GitHub Desktop.
Вывод содержания одной статьи
if (isset($_GET['article']) ){
$article = $_GET['article'];
}
function getArticle($param,$article) {
$param = ORM::for_table('articles')->where('id_articles', $article)->find_one();
return $param;
}
$result = null;
$resultArticle = getArticle($result,$article);
echo 'текст статьи <mark>'.$resultArticle->text_article.'</mark>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment