Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php file put content

<?php
$data = ["a@gmail2.com" => ["more" => ["yes" => "More"]]];

$inp = file_get_contents('results.json');
$tempArray = json_decode($inp);
array_push($tempArray, $data);
$jsonData = json_encode($tempArray);
file_put_contents('results.json', $jsonData);
Comment

PREVIOUS NEXT
Code Example
Php :: php declare strict_types 
Php :: laravel create seeder 
Php :: php replace blackslash 
Php :: remove foreign key constraint laravel 
Php :: wordpress post revisions config 
Php :: laravel eloquent select one column 
Php :: mysqli last index php 
Php :: laravel auth user_id 
Php :: Flutter migrate to Android Studio mac os 
Php :: laravel set config value dynamically 
Php :: the posts pagination 
Php :: php list all constants 
Php :: dummy data in laravel 
Php :: php check string is int 
Php :: migrate specific file laravel 
Php :: php mac address 
Php :: php constant array 
Php :: turn off deprecated warnings php 
Php :: php get ip client 
Php :: Notice: Trying to access array offset on value of type int in /var/www/pdam/modules/phpexcel/PHPExcel/Cell/DefaultValueBinder.php on line 82 
Php :: laravel collection transform 
Php :: use php variable in html attributes 
Php :: get text field value in php 
Php :: how add new column in larevel with migration 
Php :: Laravel retrieving single record 
Php :: Clear php cache 
Php :: wordpress get post type 
Php :: laravel check if record exists 
Php :: convert date to timestamp in laravel builder 
Php :: cloudinary laravel 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =