$data=['test','test2'];
I try with
$finalData = implode(',',$data);
Actual result
var_dump($finalData); output : string(10) "test,test2"
Accepted result
var_dump('test1','test2'); output: string(5) "test1" string(5) "test2"
Thanks in advance
If you need push array values in function as separated arguments, you are probably searching for Argument unpacking
This can be done by ... operator.
Used as
functionCall(...$array);
2.1m questions
2.1m answers
60 comments
57.0k users