Im trying to read a value of an ajax send jsonarray to base my filename upon but i cant seem to figure out how to read the value.
my php;
$postdata = $_POST['data'];
$jsondata = json_decode($postdata);
$myname = $jsondata->name;
$dir = 'users/'.$myname.'/desktop-'.$myname.'.json';
json array looks like this;
[{"name":"mmichel"},
{"myicons":
[{"icon":
[{"name":"homepagelink","rel":"http://test.tocadovision.nl","id":"icon1","class":"icon bookmark"}]
},
{"icon":
[{"name":"aboutpagelink","rel":"http://test.tocadovision.nl","id":"icon2","class":"icon bookmark"}]
}]
}]
hope someone can tell me what im doing wrong.. must be rly easy i guess
