A JSON string is sent via a HTTP request to my webservice, it looks like this:
[\"Mairie\",\"Préfectures et sous-préfectures\"]
How can i do to make a simple php array in which i can perform php arrays functions such as implode.
I tried this but it didn't transform the JSON String into an array:
$list=json_decode($_POST["The_JSON_Parameter"],true);
EDIT:
var_dump(json_decode($_POST["The_JSON_Parameter"], true));
$var=json_decode($_POST["The_JSON_Parameter"],true);
$in_list = "'".implode("','", $var)."'";
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $in_list);//in the text file i got this empty string: ''