Quick one; I know a solution, but I\'m looking for something more elegant if it exists.
I\'m using PDO for prepeared statements:
$sql = \"INSERT INTO
One liner...
$array = array('test'=>'55','yest'=>'66');
$array = array_flip(array_map(function($v){return ':' . $v;},array_flip($array)));
// array(':test'=>'55',':yest'=>'66');
However this isn't safe as array_flip relies on all values being unique.
So one of the looping solutions is probably the best, or alternatively array_keys with array_combine.