Jump to content

Archived

This topic is now archived and is closed to further replies.

putnamehere

no lin breaks?

Recommended Posts

is they anyway i can take away line breaks from text.. example.

Text:
This.
That.
The other.

What i want it to be:
This. That. The other.

Share this post


Link to post
Share on other sites
Simple:
[code]$str = "String<br />with <br />line breaks<br />";
$str = str_replace("<br />", "", $str);

echo $str;[/code]

Share this post


Link to post
Share on other sites
[!--quoteo(post=363052:date=Apr 9 2006, 12:40 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 9 2006, 12:40 PM) [snapback]363052[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Simple:
[code]$str = "String<br />with <br />line breaks<br />";
$str = str_replace("<br />", "", $str);

echo $str;[/code]
[/quote]

it works but i want to write "$str" to a file and for that it dosent work any ideas y?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.