Jump to content

First steps in JSON


Recommended Posts

Hi all,


I am sure this is simple, but I just can't wrap my head around a suitable way of doing this!


Basically I have my JSON result as something like :


Array ( [result] => success [source] => gotBits [success] => 64 ) 


What I simply want to do is get the [success] output and store it as a variable.


I have been looking at json_decode, but I cant find any examples for arrays, just strings?


Can you push me in the right direction?

Link to comment
Share on other sites

Hi dude still i m not completely cleared but


If you are getting value in an array format than u don't u store it in a variable and than use that variable to get that data example

$valueHolder = $json->call('getBits',Array());



Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.