I'm looking to figure out how to add more arguments to a function call based on an Array and can't figure out what I need to do. The function in question doesn't work with simply passing an array, but the array has to explode somehow as if each array element was a new argument in the function call. I don't think call_user_func_array works but perhaps I don't know how to execute it properly. To give some context, the array of arguments are coming from a varying amount of $_GET arguments which is processed by an API class file I have no control over, but it appears that I can add a lot of arguments that allow the results to filter.
$arrayofarguments = array("dynamicarg1","dynamicarg2","dynamicarg3");
$runthis = example($staticargument1,
$staticargument2,
$staticargument3,
$arrayofarguments,
$staticargument4);
//run the results
echo $runthis;
Expected result
$runthis = example($staticargument1,
$staticargument2,
$staticargument3,
"dynamicarg1",
"dynamicarg2",
"dynamicarg3",
$staticargument4);
Thanks for the help! :)