Very new to PHP. I have made a script to output into a text file. Don't know how to format the text from the PHP code. Specifically I am trying to feed each variable to a new line rather than having it just wordwrap in editor. The "LF" seen in the code only creates a space between the outputs. It does not send to a new line. I don't have a book to assist me. Help please...
Here is the script:
<?php
$text = implode("LF",$_POST);
$date = $_POST['v2'];
$dated=$date;
touch ("/amarok1/jrj28/redlogdat/$dated");
$file = "/amarok1/jrj28/redlogdat/$dated";
$fp = fopen ("$file", "a+");
fwrite($fp, $POST['v1']);
fwrite($fp, $POST['v2']);
print $text;
fclose($fp);
?>
I forgot to say what I'm operating off of. I am using Linux gedit to display my results. The code is written in xemacs. Where exactly should I insert the /n?
By the way. Is there a way to update my postings rather than write a new one that's almost identical??