i got this json encoded data being sent to me. can u tell me how to get each of the individual elements ? Something like:
$ticket
$customer
$user
{"ticket":{"id":"10909446","number":"152"},"customer":{"id":"3909381","fname":"","lname":"","email":"me@site.com","emails":["me@site.com"]},"user":{"fname":"Test","lname":"Me","id":17396,"role":"admin"}}
this is a basic view on how my code runs.
$ret = array('html' => '');
$data = json_decode($data , true);
$ret['html'] = '<ul><li>'.$data->ticket->number.'</li></ul>';
echo json_encode($ret);
exit;
it only prints the circle from the li tags.