1$data[] = $_POST['data'];
2
3$inp = file_get_contents('results.json');
4$tempArray = json_decode($inp);
5array_push($tempArray, $data);
6$jsonData = json_encode($tempArray);
7file_put_contents('results.json', $jsonData);
1{"Markers": [
2{
3 "title" : "Meow Monestary",
4 "position" : {
5 "lat" : 40.5178,
6 "lng" : -122.6438
7 },
8 "posterContact" : {
9 "name" : "Mr Meowser",
10 "email" : "MrMeow@Couch.com",
11 "phone" : "(555)-202-3040",
12 "private" : true
13 },
14 "type" : "myResidence",
15 "ownerContact" : {
16 "name" : false,
17 "email" : false,
18 "phone" : false,
19 "private" : true
20 },
21 "description" : "Meow meow purrrrr. Dogs are not my favorite but they are my second favorite.",
22 "private" : true
23},
24