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
It has already been answered but this is what I came up with anyway.
$arr = array('foo'=>1,'bar'=>2); $arr = array_flip($arr); array_walk($arr,create_function('&$v,$k', '$v = ":$v";')); $arr = array_flip($arr); print_r($arr);