Stargate Infinity : 1080p - BD&E
Beauty and the Beast: 1080p BD & E
The Jungle Book: 1080p - BD&E
The Prince and the Pauper: 1080p - BD&E
Biff! Biff! Biff!: New Biff!
. .
gaupess
Category:Argentine guitarists
Category:Male guitarists
Category:Argentine emigrants to Chile
Category:Argentine rock musicians
Category:1956 births
Category:Living people
Category:Argentine expatriates in Chile
Category:20th-century Argentine guitarists
Category:21st-century guitarists
Category:Argentine musicians
Category:20th-century male musicians
Category:21st-century male musiciansQ:
Returning json object with dynamic keys
I need to create the json object that is presented below
{
"id": "user_1",
"email": "john@company.com",
"firstname": "John",
"lastname": "Doe",
"username": "john.doe"
"points": "32"
}
The thing is that the keys of the json object can be different, so I can't hard code the keys. I tried using this in my php file:
$json['id'] = $row['id'];
Then when I try to create the json object I use
echo json_encode($json);
But the json object that is returned is not like the one that I need.
I tried using this, I'm getting the json object fine, but it's not structured like the one I want
$row['id'] = $id;
$row['email'] = $email;
$row['firstname'] = $firstname;
$row['lastname'] = $lastname;
$row['username'] = $username;
$row['points'] = $points;
$json = array('id' => $id,
'email' => $email,
'firstname' => $firstname, ac619d1d87
Related links: