function basefiles() {
echo "
<meta charset='utf-8'>
<link rel='stylesheet' href='".autov("/styles/main.css")."'>
<script language='javascript' type='text/javascript' src='/scripts/jquery.min.js'></script>
<script language='javascript' type='text/javascript' src='".autov('/scripts/main.js')."'></script>
";
}
if (in_array($input->get('option'), array('com_installer', 'com_regularlabsmanager')) && $input->get('action') != '')
{
return;
}
onClick="counter();"
<?php
$log = $name['login']; # Логин из сессии
$resul = mysqli_query($connection, "SELECT * FROM `users` WHERE `login` = '{$log}'" );
# ^ Мне нужно достать id юзера
$row = mysqli_fetch_assoc($resul);
function getPost(){
global $connection, $row;
$num = isset($row['id']) ? $row['id'] : false;
$sql = "SELECT * FROM `posts` WHERE `user_id` = '{$num}' ORDER BY `id` DESC ";
# ^ хочу достать все посты, с id пользователя
$result = mysqli_query($connection, $sql);
$posts = mysqli_fetch_all($result, MYSQLI_ASSOC);
return $posts;
}
$posts = getPost();
var_dump($posts);
<?php
$news_title_st = 'Пример текста заголовка помещенный в тег';
$news_title_md = mb_strimwidth($news_title_st, 0, 10, "...", "utf-8");
echo $news_title_md; //Пример ...
$news_title_md = mb_strimwidth($news_title_st, 0, 13, "...", "utf-8");
echo $news_title_md; //Пример тек...