How to Redirect a Web Page

301 Redirect 301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It’s not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it’s the safest option. The code “301” is interpreted as …

Switch Case

Example #1 switch structure <?php if ($i == 0) { echo “i equals 0”; } elseif ($i == 1) { echo “i equals 1”; } elseif ($i == 2) { echo “i equals 2”; } switch ( $i) { case 0: echo “i equals 0”; break; case 1: echo “i equals 1”; break; case 2: echo “i equals 2”; break; } ?> Example #2 switch structure allows usage of strings <?php switch ($i) { case “apple”: echo “i is apple”; …