title: How do I pass a $params array as parameters to a function?
body: <p>How can I convert an array of various-typed parameters to actual parameters in a function?</p>
  
  <pre><code>$params = array( 'the title2', 'the footer2', 10);
  displayTest(implode(',', $params)); //how???
  displayTest(convert_to_parameters($params)); //how???
  
  function displayTest($title, $footer, $numberOfItems = 0) {
      $r = '';
      $r .= '&lt;div&gt;'.$title.'&lt;/div&gt;';
      for($index = 0; $index &lt; $numberOfItems; $index++) {
          $r .= '&lt;div&gt;the text&lt;/div&gt;';
      }
      $r .= '&lt;div&gt;'.$footer.'&lt;/div&gt;';
      return $r;
  }
  </code></pre>