Page 1 of 1

Write to text file

Posted: Mon Apr 23, 2007 6:41 am
by sebcash
Hi,

I'm using fckeditor to edit a section of text. Once the form is submitted I append the data to a sql table and create a text file for Flash to import. My problem is that the text file has 'enter' break and 'tabs', I don't what that but rather a straight line of html code.

Current text file:
hotel <br />
<ul>
<li>grand</li>
<li>luxury</li>
<li>spot</li>
</ul>

Required text file:
hotel <br /><ul><li>grand</li><li>luxury</li><li>spot</li></ul>

Thanks

Posted: Mon Apr 23, 2007 6:50 am
by CoderGoblin
New lines should be "\n" so you could use str_replace to remove them.
Note: use double quotes not single quotes -

Code: Select all

$string_var=str_replace("\n","",$string_var);