i have an array in my PHP script,
$args=array("red","green","blue","yellow");
i want to execute a bash command who prints all values of an array.
red
green
blue
yellow
i read this question and this one, i don't want just to pass an array as an argument, i want to print each value of my array, i tried this
exec('echo ' . '"${args[@]}"');
but i got
sh: 1: Bad substitution
bash?