I get a json data from Android App which looks like
{"NickName":"Tom"}
how to get NickName data with php?
use html_entity_decode to make json data and json_decode to get name
html_entity_decode
json_decode
Check in fiddle : https://eval.in/780633
<?php $str = "{"NickName":"Tom"}"; echo $text = html_entity_decode($str); echo "\n"; echo json_decode("$text")->NickName; ?>
use
html_entity_decodeto make json data andjson_decodeto get nameCheck in fiddle : https://eval.in/780633