I have a json array storred in a file looking like:
["bla bla","bla bla2","bla bla3"]
And if I want to remove one of these objects from the json array with the code below the json converts to another type of array looking like:
{"1":"bla bla","2":"bla bla2","3":"bla bla3"}
I dont want this to happen because it screws up code in another place. How can I achieve this?
$eng = json_decode($en_banners, false);
unset($eng[$id]);
$myFile = "languages/banners.php";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "<?php \$de_banners='".json_encode($eng)
var_export.json_decode($blah, true)- parse JSON as assoc array and not object.