So I have this string:
[{values: {"US" : "rgba(29, 79, 207, 1)"}},{values: {"NL" : "rgba(29, 79, 207, 1)"}}]
This string sets colours for jvectormap. the entire reason for this function, I will only show countries that visited.
It's from Javascript, and I need to use this same format but in PHP and I think it has something to do with json encode but I can't get it to work.. So what I want to do is make an array into this string.. How would I do that?
When I make an array in PHP and encode it to json, this comes out:
[["NL","black"],["US","blue"]]
and this format wont work of course.