putnamehere Posted April 9, 2006 Share Posted April 9, 2006 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. Link to comment https://forums.phpfreaks.com/topic/6953-no-lin-breaks/ Share on other sites More sharing options...
wildteen88 Posted April 9, 2006 Share Posted April 9, 2006 Simple:[code]$str = "String<br />with <br />line breaks<br />";$str = str_replace("<br />", "", $str);echo $str;[/code] Link to comment https://forums.phpfreaks.com/topic/6953-no-lin-breaks/#findComment-25269 Share on other sites More sharing options...
putnamehere Posted April 9, 2006 Author Share Posted April 9, 2006 [!--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? Link to comment https://forums.phpfreaks.com/topic/6953-no-lin-breaks/#findComment-25277 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.