Write a file
When we need to add data without overwriting the existing contents, add fopen($myFile, 'a') instead of giving fopen($myFile, 'w')