",, "<" $new1 = array("%"); #Меняем на полезное">", , "<" $text = str_replace($old1, $new1, $text); #Собсно сама замена =) return $text; } class modClass { static $content = ''; /* ---------------------------------------------------------------------- 16.05.2025 Получаем дочерние категории ---------------------------------------------------------------------- */ static function getRootCategory() { return \DBmysql::getAll("SELECT `id`, `title`, `json` FROM `ctovar` WHERE `status`=? AND `cat`=? ORDER BY `sort`, `title`", [1, 0]); } } $array=DBmysql::getAll("SELECT tovar.id, tovar.title, tovar.json, cenaarendy.ch4 as cena FROM tovar JOIN cenaarendy ON tovar.id=cenaarendy.tovar_id WHERE title LIKE '%" . $_SESSION['find_txt'] . "%'"); $c=count($array); for ($i=0; $i<$c; $i++)$array[$i]['images']=core::j($array[$i]['json'])['images'][0]; //print_r($array); $smarty->assign('tovar', $array); $smarty->assign('title', "Поиск по сайту - " . $_SESSION['find_txt']); $smarty->assign('rootCategory', modClass::getRootCategory()); ?>