I’d like to be able to convert all post data to a string but keep only the values in a string variable.
So if my posted data looks like this:
Array ( [alloy] => Array ( [0] => K18 [1] => )
[color] => Array ( [0] => Gold [1] => )
[stone] => Array ( [0] => Diamond [1] => )
[dimension] => Array ( [0] => 3cm [1] => )
[button1] => Submit )
i’d like it to finally look like: $data = ‘K18, color Gold, Diamond, 3cm’;
I’ve tried serialize, imploding array, http_build_query but they’re not what I need.
if it helps to get the whole idea, I’m collecting data from 4 groups of checkbox and radiobutton arrays and I’d like to put the selected values into a delimited string and save to my db.
Maybe this is what you need: