This is probably impossible, but I'll ask, is there, in addition the the method above to remove the '[]', to remove the quotes that surround the keys, but leave them around the values? For example: {"account_id":"3","display_name":"Project Requested By","id":"15"} would output as {account_id:"3",display_name:"Project Requested By",id:"15"}
–
user1176783Feb 9 '12 at 17:55

@user1176783 You can do that fairly easily with a regex. Try something like preg_replace('/"([^"]+)":/', '$1:', trim(json_encode($requiredFieldsArray), '[]'))
–
PaulproFeb 9 '12 at 18:18