Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic

json decode to array

json decode to array  using -'php,json'

I am trying to decode a JSON string into an array but i get the following error.

  Fatal error: Cannot use object of type
  stdClass as array in
  C:\wamp\www\temp\asklaila.php on line

Here is the code:

$json_string = '';

$jsondata = file_get_contents($json_string);
$obj = json_decode($jsondata);


asked Sep 15, 2015 by NanHunley
0 votes

Related Hot Questions

Government Jobs Opening