title: How to get user input for switch statement in php?
body: <p>As questioned above I'm trying to get user input in my PHP script to do further tasks. Is there any method in PHP to get user input like 'scanf()' used in C</p>
  
  <pre><code>&lt;?php
  echo "Swapping Numbers &lt;/br&gt; Please select the method: &lt;/br&gt;";
  echo "1. Using 3rd variable &lt;/br&gt; 2. Using add/sub &lt;/br&gt; 3. Using mul/div";
  //read user input $choice
  switch($choice)
  {
  case 1:
          break;
  case 2:
      break;
  case 3:
      break;
  default:
          echo "&lt;/br&gt;You entered wrong choice";
  }
  ?&gt;
  </code></pre>