title: How to write a function similar to $_GET?
body: <p>Is there a function that works like $_GET ?
  I mean a function that transforms </p>
  
  <pre><code>"?var1=5&amp;var2=true"
  </code></pre>
  
  <p>to </p>
  
  <pre><code>$var1=5; 
  $var2="true";
  </code></pre>
  
  <p>So that I can use one variable (string) in a function and fetch many variables from it?</p>
  
  <p>Like:</p>
  
  <pre><code>function manual_GET($args){ /* ? */}
  
  function myFunction($args)
  {
  manual_GET($args);
   if(isset($var1))/* doesn't have to be this way, btw */
   {
     do_something($var1);
   }
   //etc
  }
  </code></pre>
  
  <p>p.s. : I don't want to use $_GET with URL because this file is a class file (namely database_library.php) so I don't execute it directly, or make an AJAX call. I just <code>require_once();</code> it.</p>