I have a script which Im trying to get values from a json string decoded into array.. i can not seem to access the data.
$userData = json_decode($_GET['userData']);
echo $_GET['userData']; //<--- This line works fine and show the $_GET value
$id = $userData['hottsourceID']; //<-- This line errors
$coins = $userData['coins'];
echo $id;
echo $coins;
Catchable fatal error: Object of class stdClass could not be converted to string in /home/hottsour/public_html/DeadRun/php/AppCreateDRAccount.php on line 11