Answers for "write to afile new line php"

PHP
1

php fwrite new line

$data = 'my data' . PHP_EOL . 'my data';
$fp = fopen('my_file', 'a');
fwrite($fp, $data);
fclose($fp);
Posted by: Guest on December-13-2020
1

php new line

return nl2br("This is the cointracker sample text.nThis should be line 2!");
Posted by: Guest on February-22-2021

Browse Popular Code Answers by Language