I have an $_POST array that looks like this.
Array (
[burrito] => Cilantro
[pizza] => Array ( [0] => Avocado [1] => Italian Sausage [2] => pepperoni )
)
I need $_POST variable to be dynamic. So, burrito & pizza is not fixed variable.
I want this to look like:
burrito=>Cilantro , pizza=>(Avocado, Italian Sausage, pepperoni)
I suspect I need to use:
foreach($_POST as $key => $value){
foreach($_POST[$key] as $d => $k){
}
}
And the implode() function.
But I am stuck here. Whatever I do, the result would not come out.