HTML Code:
<?php
$content = '';
if(in_array(16, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 16, 2);
elseif(in_array(11, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 11, 2);
elseif(in_array(12, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 12, 2);
elseif(in_array(13, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 13, 2);
elseif(in_array(14, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 14, 2);
elseif(in_array(15, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 15, 2);
elseif(in_array(17, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 17, 2);
elseif(in_array(18, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 18, 2);
elseif(in_array(19, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 19, 2);
elseif(in_array(20, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 20, 2);
elseif(in_array(21, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 21, 2);
elseif(in_array(22, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 22, 2);
elseif(in_array(23, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 23, 2);
elseif(in_array(24, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 24, 2);
elseif(in_array(25, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 25, 2);
elseif(in_array(26, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 26, 2);
elseif(in_array(27, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 27, 2);
elseif(in_array(28, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 28, 2);
elseif(in_array(29, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 29, 2);
elseif(in_array(30, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 29, 2);
elseif(in_array(31, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 31, 2);
elseif(in_array(32, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 32, 2);
elseif(in_array(33, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 33, 2);
elseif(in_array(34, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 34, 2);
elseif(in_array(35, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 35, 2);
elseif(in_array(36, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 36, 2);
elseif(in_array(37, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 37, 2);
elseif(in_array(38, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 38, 2);
elseif(in_array(7, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 7, 2);
elseif(in_array(65, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 65, 2);
elseif(in_array(984, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 984, 2);
elseif(in_array(9, explode('_',$_GET['cPath'])))
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 9, 3);
elseif($cPath == 3)
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath'], 1);
elseif($cPath == 2)
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', $_GET['cPath'], 1);
else
$content .= $_SESSION['category_tree']->build_category_string('ul', 'li', '', 0, 2);
?>
As a php novice using probably too many statements that is required to do the job. Will all these statements put an unnecessary load on the server? (as there will be a few more).
Bookmarks