I am trying to get my JSON output like this.
{"allterms":[{"group":{"Name":"Test 1"},{"group":{"Name":"Test2","Id":"298"}}]
My current code is
while($r = mysql_fetch_assoc($rs)) {
$rows['allterms']['group'][] = $r;
}
Which gives me this
{"allterms":{"group":[{"Name":"Test1", "Id":"1740"},{"Name":"Test2","Id":"631"}}]
How can I adjust my code so that each item has a parent term group
.