Learning PHP and MySQL

Example 04-11 What happens when there are no break keywords

<?php
$action
=”ASSEMBLE  ORDER”;
switch  (
$action)  {
case  "ASSEMBLE  ORDER":
  echo  
"Perform  actions  for  order  assembly.<br>";
case  
"PACKAGE":
  echo  
"Perform  actions  for  packing.<br>";
case  
"SHIP":
  echo  
"Perform  actions  for  shipping.<br>";
?>

Posted by on 08/03 at 08:13 AM

Next entry: Example 04-12 Using the DEFAULT: statement to generate an error

Previous entry: Example 04-10 Using switch to test for multiple values

<< Back to main