$Row = mysqli_fetch_assoc(mysqli_query($CONNECT, 'SELECT `name`, `cat_id`, `cat2_id`, `cat3_id`, `cat_url`, `cat2_url`, `cat3_url`, `cat_href`, `cat2_href`, `cat3_href`, `added`, `date`, `read`, `text`, `download`, `size`, `link_user`, `link_guest`, `rate`, `rateusers` FROM `addons` WHERE `id` = '.$Param['id']));
if ($Row['cat_id']) $id_cat = $Row['cat_id'];
if ($Row['cat2_id']) $id2_cat = $Row['cat2_id'];
if ($Row['cat3_id']) $id3_cat = $Row['cat3_id'];
$Row1 = mysqli_fetch_assoc(mysqli_query($CONNECT, 'SELECT * FROM `lfmenu` WHERE `id` = '.$id_cat));
$Row2 = mysqli_fetch_assoc(mysqli_query($CONNECT, 'SELECT * FROM `lfmenu` WHERE `id` = '.$id2_cat));
$Row3 = mysqli_fetch_assoc(mysqli_query($CONNECT, 'SELECT * FROM `lfmenu` WHERE `id` = '.$id3_cat));
if ($Row1['id'] == $id_cat) $cat = $Row1['title'];
if ($Row2['id'] == $id2_cat) $cat2 = $Row2['title'];
if ($Row3['id'] == $id3_cat) $cat3 = $Row3['title'];
echo '<p>:'.$cat.' '.$cat2.' '.$cat3.'</p>';
Как адаптировать такой код? Получится должно так:
echo '<p>:'.GTA.' '.Автомобили.' '.Легковые.'</p>';