Question: How to flatten multidimensional associative array to just strings in PHP? I currently have an array that looks like this: Array ( [Name1] => Array
How to flatten multidimensional associative array to just strings in PHP?
I currently have an array that looks like this:
Array ( [Name1] => Array ( [0] => trait1 [1] => color1 [2] => hat1 ) [Name2] => Array ( [0] => trait2 [1] => color2 [2] => hat2 ) [Name3] => Array ( [0] => trait3 [1] => color3 [2] => hat3 ) )
How do I convert that to a string so that I can write it to a text separated by delimiters? So that Array1 looks something like this: Name1,trait1,color1,hat1?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
