How can i do something like this? Does someone know how to get content from another Json file and overwrite another json file with new value. I tried this but no result. Can someone help me with this, i need this its an commission from school.
the two Json files are list.json and listbackup.json. I want a code that can use listbackup.json file to overwrite list.json.
$backupFile= file_get_contents("listbackup.json");
$backupFile= json_encode($backupFile, "
");
file_put_contents('list.json', $backupFile);