PHP: How to use params here?
<p>I am making a function so that I can post from Ajax using a general function where I just pass the params, to avoid having to create one php file for each Ajax function.</p>

<p>This is how my function looks right now in the PHP side after receiving, via post, the params that you can see in the code:</p>

<pre><code>$class_name = $_POST['class_name'];
$function_name = $_POST['function_name'];
$params = "'" . implode("','", $_POST['params']) . "'";
$model = new $class_name();

//Apply the function
echo $model-&gt;$function_name($params);
</code></pre>

<p>It is working except from the part of the params... PHP is interpreting it as one param, what can I do so that $params is not intepreted as a single string?</p>
