Hi all,
I am fairly new to php, but I am making a website for a client.
I am using some code to make a file, which has a .csv extension.
The file writes perfectly, all of the text is written in and all the variables are being populated correctly. However, if my variable $newbody has html inside it, it seems to evaluate this HTML as its being put into the file.
For example, where there are <p> tags, it is writing a new line instead of just leaving it on the same one. I just want the $newbody variable to be written as some text.
The code I am using to write the file (or the line of interest) is:
$csvdata = $model . ',' . $newcatagory . ',' . $title . ',' . $bodynew . ',' . $amount930 . ',' . $amount900 . ',' . $amount915 . ',' . $amount946 . ',' . $amount960 ."\n";
fwrite($file,$csvdata); // Write information to the file
Thanks in advance for any help.
Kind Regards
Tom