title: Switch Case in php Multiple Case run in function?
body: <pre><code>switch(n){
  case "badge01":
  case "badge02":
  case "badge03":
  case "badge04":
  case "badge05":
  //dosomething
       break;
  }
  </code></pre>
  
  <p>Hi above's switch case statement, I would like to use a function to run the multiple loop to generate the case's name, so can i know how to generate with function on a switch case statement like this?</p>
  
  <pre><code>switch(n){
  case badgenameloop():
  //dosomething
       break;
  }
  </code></pre>
  
  <p>And is it possible to do that?</p>
  
  <p>Thanks and sorry for my bad English.</p>