title: Php function from a variable
body: <p>I want to be able to submit a value from a form and then call the function submitted, my code:</p>
  
  <pre><code>&lt;?php
  include 'specs.php';
  if (empty($_POST) === false) {
  $func = $_POST['function'];
  $a1 = $_POST['a1'];
  $a2 = $_POST['a2'];
  $a3 = $_POST['a3'];
  $a4 = $_POST['a4'];
  $a5 = $_POST['a5'];
  echo $func.'('$a1', '$a2', '$a3', '$a4', '$a5');';
  }
  ?&gt;
  &lt;form action="" method="post"&gt;
  Function:&lt;br&gt;&lt;input type="text" name="function"&gt;&lt;hr&gt;
  Value 1: &lt;input type="text" name="a1"&gt;
  Value 2: &lt;input type="text" name="a2"&gt;
  Value 3: &lt;input type="text" name="a3"&gt;
  Value 4: &lt;input type="text" name="a4"&gt;
  Value 5: &lt;input type="text" name="a5"&gt;
  &lt;input type="submit" value="Execute"&gt;
  </code></pre>