Answers for "how to add one more line to string php"

PHP
7

php multiple line string

//use EOD function for multiple line variable
$variable=<<<EOD
  this is line1
  this is line2
  EOD;
Posted by: Guest on June-09-2020
2

append new line php

$data = 'some data'.PHP_EOL;
$fp = fopen('somefile', 'a');
fwrite($fp, $data);
Posted by: Guest on May-28-2020

Code answers related to "how to add one more line to string php"

Browse Popular Code Answers by Language