is it possible to have more than one if, one elseif, and one else in a script - can you have more than three functions like this in one statement?
thanks
thanks
if(true) {
if(true) {
...
}
else if(true) {
...
if(true) {
...
else {
...
}
}
else if(true) {
...
}
}
else {
...
}
<?php
if ($_GET["name"] == comp){
echo "<img src=\"pics/1.gif\" align=texttop>";
}
elseif ($_GET["name"] == lap){
echo "<img src=\"pics/2.gif\" align=texttop>";
}
else{
echo "Please enter a valid place";
}
?>
switch ($_GET["name"]) {
case "comp":
$pic=1;
break;
case "lap":
$pic=2;
break;
default:
$pic="defaultimage";
}
echo "<img src=\"pics/$pic.gif\" align=texttop>";
Comment