Luke
27-11-2010, 01:09 PM
Right, I have this code to define a title on a div;
<?php
if(!$_GET['page']) {
echo "Homepage";
}
elseif($_GET['page']) {
if($_GET['subpage']) {
$page_name = str_replace("_", " ", $_GET['page']);
$subpage_name = str_replace("_", " ",$_GET['subpage']);
echo strtoupper($page_name." - ".$subpage_name);
}
elseif(!$_GET['subpage']) {
if($_GET['page'] == "ADMINISTRATIONCENTRE")
{
echo strtoupper("ADMINISTRATION CENTRE");
}
else
{
echo strtoupper($_GET['page']);
}
}
}
?>
Now, what I want another code to do is show an image defined by the page&subpage so it would be something like
<img src="images/$page_name;$subpage_name;.png"> if you get me..
Can anyone help?
<?php
if(!$_GET['page']) {
echo "Homepage";
}
elseif($_GET['page']) {
if($_GET['subpage']) {
$page_name = str_replace("_", " ", $_GET['page']);
$subpage_name = str_replace("_", " ",$_GET['subpage']);
echo strtoupper($page_name." - ".$subpage_name);
}
elseif(!$_GET['subpage']) {
if($_GET['page'] == "ADMINISTRATIONCENTRE")
{
echo strtoupper("ADMINISTRATION CENTRE");
}
else
{
echo strtoupper($_GET['page']);
}
}
}
?>
Now, what I want another code to do is show an image defined by the page&subpage so it would be something like
<img src="images/$page_name;$subpage_name;.png"> if you get me..
Can anyone help?