make a reference to a method in a class
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6531019/call-php-class-method-from-string-with-parameter">Call php class method from string with parameter</a>  </p>
</blockquote>



<p>I am trying to call a method in a class from a string of the method and a string of the class, by means of <code>call_user_func_array()</code></p>

<p>For Example:</p>

<pre><code>$class = 'Posts';
$classObj = new $class();
$func = 'makePost';
$params = array('something', 'somethingelse');
call_user_func_array($classObj-&gt;$func, $params);
</code></pre>

<p>This does not work for me. :C</p>

<p>How do I go about doing this?</p>
