title: PHP Get variable to equal value of switch
body: <p>I am trying to get a variable on my page to equal the result of a switch I have.</p>
  
  <p>This is the code:</p>
  
  <pre><code>$payment_method = switch ($cardtype) {
  case "visa" : echo "VSA"; break;
  case "mastercard" : echo "MSC"; break;
  case "maestro" : echo "MAE"; break;
  case "amex" : echo "AMX" ; break;
  default : echo "Please specify a payment method!"; break;
  };
  </code></pre>
  
  <p>How can I get $payment_method to equal the result of this????</p>
  
  <p>So far I recieve an error:</p>
  
  <pre><code>Parse error: syntax error, unexpected T_SWITCH in /var/www/account/credits/moneybookers/process.php on line 65
  </code></pre>