It's not much of a question you've asked, but I will say that that isn't valid JSON. If it's meant to be an array of values then it would need to be:
'[{"var1":"9","var2":"16","var3":"16"},
{"var1":"8","var2":"15","var3":"15"}]';
Note that I replaced the first and last '{' and '}' with '[' and ']' respectively, because that's what signifies an array in JSON.
Also your
foreach
loop is printing the
$k
variable which is likely to be just the index of the element in the array, not that value at that specific index.