Instead of specifying parameters to PHP function I want to pass string that is comma separated. However, the code below print the string as $param1.
$str = "param1, param2";
function test($param1, $param2) {
echo "\n\n\n".$param1;
}
test($str); //output the $str instead of $param1
Can I pass string to the function?