How do I encode an array like this:
$myArray = "["user1","user2","user3"]"
into this dynamically:
{
"myArray": "user1, user2, user3"
}
I understand that the JSON above isn't an array but I still want it in that form. Also, JSON encode doesn't encode it exactly like how I want it.