|
Ok. Sorry for not posting this earlier, but about your previous code. I modified it a little to suit my needs. It now looks like this...
<?php
$dir = str_replace('/', '', __DIR__);
switch($dir)
{
case 'travel':
echo '<div id="top">';
break;
case 'sports':
echo '<div id="top1">';
break;
case 'politics':
echo '<div id="top2">';
break;
case 'submit':
echo '<div id="top3">';
break;
case 'links':
echo '<div id="top3">';
break;
case 'column':
echo '<div id="top3">';
break;
case 'funny':
echo '<div id="top3">';
break;
default:
echo '<div>';
}
?>
It doesn't work though, and I'm not sure why. No errors showed up, it just doesn't display the <div> tags. I also have some code before it
<?php
switch($_SERVER['PHP_SELF'])
{
case '/travel.php':
echo '<div id="top">';
break;
case '/sports.php':
echo '<div id="top1">';
break;
case '/politics.php':
echo '<div id="top2">';
break;
case '/index.php':
echo '<div id="top3">';
break;
case '/submit.php':
echo '<div id="top3">';
break;
case '/links.php':
echo '<div id="top3">';
break;
case '/column.php':
echo '<div id="top3">';
break;
case '/funny.php':
echo '<div id="top3">';
break;
default:
echo '<div>';
}
?>
I'm not sure if this has anything to do with its problem. Thanks
__________________
Alex
|