portman Posted August 12, 2014 Share Posted August 12, 2014 Hi Can some one help me by telling me how I split up the string in this array to get to the value associated with "Value".... ie 1.0794 array(1) { [0]=> string(116) "{"status":"ok","code":0,"result":{"value":"1.0794","base":"usd","target":"aud","updated_at":"2014-08-12T17:05:00Z"}}"} I've been looking at a whole bunch of different functions to work it out but just cant (I know its a newb question - please forgive me) Quote Link to comment https://forums.phpfreaks.com/topic/290410-getting-to-a-value-from-an-array/ Share on other sites More sharing options...
Solution PravinS Posted August 12, 2014 Solution Share Posted August 12, 2014 Use $result = json_decode($string,true); you will get $result in array format Quote Link to comment https://forums.phpfreaks.com/topic/290410-getting-to-a-value-from-an-array/#findComment-1487495 Share on other sites More sharing options...
portman Posted August 12, 2014 Author Share Posted August 12, 2014 thanks PravinS Quote Link to comment https://forums.phpfreaks.com/topic/290410-getting-to-a-value-from-an-array/#findComment-1487502 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.