In Python I would do something like this heaving the following dictionary (equiv of php's assoc array).
arr = {'id': '1', 'name': 'marcin', 'born': '1981-10-23'}
print ', '.join([('`%s` = "%s"') % (k,v) for k,v in arr.items()])
to get:
`born` = "1981-10-23", `id` = "1", `name` = "marcin"
Assuming PHP array is:
array("id"=>"1","name"=>"marcin","born"=>"1981-10-23");
Is there a way of getting the same result in PHP 5.3 without using foreach loop?