Is there a PHP function for imploding an associative array without losing the keys?

loadervn

New Member
The title of this question is self-explanatory.I've heard I can mimic this using http_build_query, but I'd rather use a function that's meant for this.Input example:\[code\]$assoc = array( "fruit" => "banana", "berry" => "blurberry", "vegetable" => "lettice");\[/code\]Desired output (I get this with http_build_query):\[code\]string(46) "fruit=banana,berry=blurberry,vegetable=lettice"\[/code\]output from reversal wanted is the same as input - that's my current problem.
 
Back
Top