Decode Json Object From A Url In Php Coming From A User
hey i am making an android app where user's request in the format of json . Their request will look like this.. JSONObject j = new JSONObject(createJson()); String url
Solution 1:
In test.php you can catch the data with $_GET['UserDetails']
then decode it with json_decode($_GET['UserDetails')
Then you can iterate it with a foreach
loop
Example:
if(isset($_GET['UserDetails'])) {
$details = json_decode($_GET['UserDetails']);
foreach($detailsas$key => $val) {
echo$key.' = '.$val;
}
Post a Comment for "Decode Json Object From A Url In Php Coming From A User"