PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
switch ($HostURL) { // Find which site to redirect to
Case ("a") || ("b"):
echo "1";
break;
Case ("c") || ("d"):
echo "2";
break;
default: // Default to main page
echo "3";
}
But something is wrong with the above as it keeps defaulting to the first case statement all the time no matter the value of hosturl. The only way i can make it work as desired is if i converted it to an if else statement. Is there a way to make it work for the switch?