<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1040720" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1040720</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Fair enough. If you needed</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/how-make-text-wrap-and-get-line-returns-text-entry-box#comment-1228715</link>
    <description> &lt;p&gt;Fair enough. If you needed the work done quickly without having to learn to code, that&#039;s the fastest way to do it. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 22 Feb 2008 15:03:34 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1228715 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Hi-
I paid someone to do</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/how-make-text-wrap-and-get-line-returns-text-entry-box#comment-1228697</link>
    <description> &lt;p&gt;Hi-&lt;/p&gt;
&lt;p&gt;I paid someone to do this because I needed it figured out... and they put in a &quot;nl2br&quot; tag and changed around a few brackets and it&#039;s working.&lt;/p&gt;
&lt;p&gt;I tried to do it but couldn&#039;t.&lt;/p&gt;
&lt;p&gt;Thanks for all the help and advice.&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;
 </description>
     <pubDate>Thu, 21 Feb 2008 22:56:06 +0000</pubDate>
 <dc:creator>cbc58</dc:creator>
 <guid isPermaLink="false">comment 1228697 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Try adding the</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/how-make-text-wrap-and-get-line-returns-text-entry-box#comment-1228695</link>
    <description> &lt;p&gt;Try adding the (non-standard) &quot;wrap=soft&quot; attribute to the textarea.&lt;/p&gt;
&lt;p&gt;Let us know if this works, okay?&lt;/p&gt;
 </description>
     <pubDate>Thu, 21 Feb 2008 22:09:22 +0000</pubDate>
 <dc:creator>webwiz</dc:creator>
 <guid isPermaLink="false">comment 1228695 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>It&#039;s a bit difficult without</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/how-make-text-wrap-and-get-line-returns-text-entry-box#comment-1228689</link>
    <description> &lt;p&gt;It&#039;s a bit difficult without knowing how your application works. We&#039;ll need to see the bit of code that prints this to the page from the database, are you able to get that and paste it in here? Just put &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; tags around it.&lt;/p&gt;
&lt;p&gt;Also, what error are you getting from PHP?&lt;/p&gt;
 </description>
     <pubDate>Thu, 21 Feb 2008 16:39:38 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1228689 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Hi -
Thanks for the</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/how-make-text-wrap-and-get-line-returns-text-entry-box#comment-1228681</link>
    <description> &lt;p&gt;Hi -&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;I&#039;m not sure where to put that in the code........ i&#039;ve tried a few spots but keep getting php errors.  I&#039;ll keep trying but if you read this maybe you can make a recommendation.&lt;/p&gt;
&lt;p&gt;Thanks again for your help.&lt;br /&gt;
Chris&lt;/p&gt;
 </description>
     <pubDate>Thu, 21 Feb 2008 13:58:52 +0000</pubDate>
 <dc:creator>cbc58</dc:creator>
 <guid isPermaLink="false">comment 1228681 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>When I look at the source</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/how-make-text-wrap-and-get-line-returns-text-entry-box#comment-1228674</link>
    <description> &lt;blockquote&gt;&lt;p&gt;When I look at the source code it looks like how I typed it into the system with the breaks in lines in all&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That&#039;s what I was talking about, yes. The only whitespace a browser will take any notice of is a space (and it will ignore any other spaces after the first too), this is so that developers can format their code nicely (indent tags, enter comments etc.)&lt;/p&gt;
&lt;p&gt;So when that system outputs the text exactly as it was entered, Web browsers will all ignore almost all of it. You need to convert those returns into &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;p&amp;gt; ... &amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Assuming you&#039;re using PHP, run the return from the database through this function:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;function nl2p($text) { &lt;br /&gt;&amp;nbsp; // Use \n for newline on all systems &lt;br /&gt;&amp;nbsp; $text = preg_replace(&amp;quot;/(\r\n¦\n¦\r)/&amp;quot;, &amp;quot;\n&amp;quot;, $text); &lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Only allow two newlines in a row. &lt;br /&gt;&amp;nbsp; $text = preg_replace(&amp;quot;/\n\n+/&amp;quot;, &amp;quot;\n\n&amp;quot;, $text); &lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Put &amp;lt;p&amp;gt;..&amp;lt;/p&amp;gt; around paragraphs &lt;br /&gt;&amp;nbsp; $text = preg_replace(&amp;#039;/\n?(.+?)(\n\n¦\z)/s&amp;#039;, &amp;quot;&amp;lt;p&amp;gt;$1&amp;lt;/p&amp;gt;&amp;quot;, $text); &lt;br /&gt;&lt;br /&gt;&amp;nbsp; // convert newlines not preceded by &amp;lt;/p&amp;gt; to a &amp;lt;br /&amp;gt; tag &lt;br /&gt;&amp;nbsp; $text = preg_replace(&amp;#039;¦(?&amp;lt;!&amp;lt;/p&amp;gt; )\s*\n¦&amp;#039;, &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;, $text); &lt;br /&gt;&lt;br /&gt;&amp;nbsp; return $text;&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;(above nabbed from: &lt;a href=&quot;http://www.webmasterworld.com/forum88/4829.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.webmasterworld.com/forum88/4829.htm&lt;/a&gt; )&lt;/p&gt;
 </description>
     <pubDate>Thu, 21 Feb 2008 04:09:10 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1228674 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I think so.  When I look at</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/how-make-text-wrap-and-get-line-returns-text-entry-box#comment-1228672</link>
    <description> &lt;p&gt;I think so.  When I look at the source code it looks like how I typed it into the system with the breaks in lines in all, but it is running altogether as one long sentence when outputted to the screen.&lt;/p&gt;
 </description>
     <pubDate>Thu, 21 Feb 2008 02:18:33 +0000</pubDate>
 <dc:creator>cbc58</dc:creator>
 <guid isPermaLink="false">comment 1228672 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>If you look in the source</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/how-make-text-wrap-and-get-line-returns-text-entry-box#comment-1228670</link>
    <description> &lt;p&gt;If you look in the source code of the pages this script outputs is the formatting correct. i.e. are all the breaks in the HTML source code?&lt;/p&gt;
 </description>
     <pubDate>Thu, 21 Feb 2008 00:59:19 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1228670 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
