$cat=mysql_fetch_array(mysql_query(\"SELECT * FROM `cat` WHERE `id` = \'\".intval($_GET[\'id\']).\"\'\"
);
$cat2=mysql_fetch_array(mysql_query(\"SELECT * FROM `cat` WHERE `id` = \'\".intval($cat[\'cat\']).\"\'\"
);
echo \"Главная\".($cat[\'id\']?\" > \".$cat[\'name\']:null).($cat2[\'id\']?\" > \".$cat2[\'name\']:null);