Created
March 10, 2019 07:18
-
-
Save ManivannanMurugavel/251894e8c2ba4a7a98d153961b57bb6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$myfile = fopen("newfile.txt", "r") or die("Unable to open file!"); | |
$email = fread($myfile,filesize("newfile.txt")); | |
fclose($myfile); | |
$myObj->name = "Manivannan"; | |
$myObj->username = "Manivannan"; | |
$myObj->email = $email; | |
$myJSON = json_encode($myObj); | |
echo $myJSON; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment