<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1026718" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1026718</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/removing-spaces-and-line-breaks-php#comment-1160534</link>
    <description> &lt;p&gt;Thanks but been there done that,&lt;/p&gt;
&lt;p&gt;Biggest problem is if there are say six &#039;s, ideally it should be cut down to two str_replace(&quot;\n&quot;,&quot;&quot;,$theinput);&lt;/p&gt;
&lt;p&gt;I have to do several combinations, , \n, \n\r etc&lt;/p&gt;
&lt;p&gt;Something I&#039;m thinking of trying is to strip all double spaces out &quot;  &quot; and adding a \n after a full stop. Down side is if the full stop isn&#039;t used it wont work as intended &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; class=&quot;smiley-content&quot; /&gt; also if a measurment is used, ie. 12.5 mm&lt;/p&gt;
 </description>
     <pubDate>Mon, 18 Oct 2004 22:01:07 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1160534 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/removing-spaces-and-line-breaks-php#comment-1160529</link>
    <description> &lt;p&gt;well why don&#039;t you try doing nl2br() first, and then searching for the &#039;s...see if that works, just to see if your logic is correct.&lt;/p&gt;
 </description>
     <pubDate>Mon, 18 Oct 2004 20:47:09 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1160529 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/removing-spaces-and-line-breaks-php#comment-1160509</link>
    <description> &lt;p&gt;Thanks but I&#039;m not &quot;html-ifiying&quot; it, comes from a form into a database, but need to strip spaces etc before going in, then when displayed am using nl2br()&lt;/p&gt;
 </description>
     <pubDate>Mon, 18 Oct 2004 08:05:14 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1160509 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/removing-spaces-and-line-breaks-php#comment-1160501</link>
    <description> &lt;p&gt;Well....if you&#039;re html-ifiying this...it could turn out that your input is:&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;This&amp;amp;nbsp;old&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;dog&amp;lt;br /&amp;gt;&lt;br /&gt;has&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;fleas&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;So in that instance, you would want to search for the HTML components, and not the PHP line break or blank space.&lt;/p&gt;
 </description>
     <pubDate>Mon, 18 Oct 2004 00:39:10 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1160501 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
