Create a php script to generate a json file
Budget: $30 – $250 USD
Please read carefully the information and also make your proposal with real amoutn. Thank you.
I need to create a json file from a php script. The structure of the json file is available in the json schema I have attached to this project.
At the moment I dont have real data, so information has to pass thru php variables with dummy data. As example:
-------
<?php
$variable1=1;
$variable2=2;
$response = array();
$posts = array();
$posts[] = array('variable1'=> $variable1, 'variable2'=> $variable2);
$response['posts'] = $posts;
$fp = fopen('results.json', 'w');
fwrite($fp, json_encode($response));
fclose($fp);
?>
-------------------
All variables and objecst has to be in the script. You can give this information from json schema wich has made with Altova.
I need to create a json file from a php script. The structure of the json file is available in the json schema I have attached to this project.
At the moment I dont have real data, so information has to pass thru php variables with dummy data. As example:
-------
<?php
$variable1=1;
$variable2=2;
$response = array();
$posts = array();
$posts[] = array('variable1'=> $variable1, 'variable2'=> $variable2);
$response['posts'] = $posts;
$fp = fopen('results.json', 'w');
fwrite($fp, json_encode($response));
fclose($fp);
?>
-------------------
All variables and objecst has to be in the script. You can give this information from json schema wich has made with Altova.