Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

write json file using php

Syntax:
file_put_contents(file_name.json.json_object);

$jsonData = {"poster":"film_poster.jpg","title":"fname","cost":"279.00","actors":[{"name":"Actor First Name","age":35,"city":"CityName"}]}

eg:
file_put_contents("geeks_data.json", $jsonData);
 
PREVIOUS NEXT
Tagged: #write #json #file #php
ADD COMMENT
Topic
Name
2+1 =