I want to use array as an argument in my function and then convert/extract that array and apply each element into another function's argument after the first argument.
$args = [ $arg1, $arg2, ...];
function foo($one = 'string', $two='string', array $args = [])
{
// my stuffs
//here calling another function where need to pass arguments
// the first argument is required
// from second argument I want to apply array item individually.
// So this function has func_get_args()
call_another_function($one, $arg1, $arg2, ...);
}
So how I can convert my function array items and apply each item to call_another_function from second parameters to infinity based on array items
call_another_functionfrom second parameters to infinity based on array itemscall_user_func_array? php.net/manual/de/function.call-user-func-array.phparray_slicecall_user_func_arraycalls a function with the arguments as array. I will give you an example based on your code.