As an aside, I was in search to find the best way to implode an associative array but using my own seperators etc...
So I did this using PHP's array_walk() function to let me join an associative array into a list of parameters that could then be applied to a HTML tag....
// Create Params Array
$p = Array("id"=>"blar","class"=>"myclass","onclick"=>"myJavascriptFunc()");
// Join Params
array_walk($p, create_function('&$i,$k','$i=" $k=\"$i\"";'));
$p_string = implode($p,"");
// Now use $p_string for your html tag
Obviously, you could stick that in your own function somehow but it gives you an idea of how you can join an associative array using your own method. Hope that helps someone :)