<?xml version="1.0"?>
<rss version="2.0">
 <channel>
  <title>PHP Text | WPDFD.com Forums</title>
  <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/</link>
  <description>A Scripting forum thread at WPDFD.com</description>
  <language>en-us</language>
  <pubDate>04/18/04, 109 26 2004 2004:%i:1082316406 15:26:46</pubDate>
  <lastBuildDate>06/07/13, 158 08 2013 2013:%i:1370585328 02:08:48</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>NineLabs Framework Feed Generator</generator>
  <managingEditor>sitemaster@wpdfd.com</managingEditor>
  <webMaster>sitemaster@wpdfd.com</webMaster>
     <item>
    <title>Vladimir  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p786</link>
    <description><![CDATA[Hi,<br /><br />I haven't tried yet but let's say I've put poems into a database. I use PHP to extract each poem to display or edit on a webpage. But poems are not just one-word text and they contain line breaks. Does the database store this information as well? If not, how can I make it do so? Thanks.]]></description>
    <pubDate>04/18/04, 109 26 2004 2004:%i:1082316406 15:26:46</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p786</guid>
   </item>
     <item>
    <title>Joe Gillespie said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p787</link>
    <description><![CDATA[Line breaks are an intregral part of 'plain text', you just have to make sure that you are using the correct flavour.<br /><br />There are three types of line break:-<br /><br />Mac - CR Ascii 13<br />DOS - CRLF &nbsp;Ascii 13 Ascii 10<br />UNIX - LF &nbsp;Ascii 10<br /><br />If you make sure you are uing the UNIX LF, you will get your line breaks.]]></description>
    <pubDate>04/19/04, 110 05 2004 2004:%i:1082361941 04:05:41</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p787</guid>
   </item>
     <item>
    <title>Vladimir  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p788</link>
    <description><![CDATA[Is there a character limit on a database entry, something like 255? Because a poem won't fit then....]]></description>
    <pubDate>04/21/04, 112 30 2004 2004:%i:1082593849 20:30:49</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p788</guid>
   </item>
     <item>
    <title>Vladimir  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p789</link>
    <description><![CDATA[I looked at a book and it said to add &lt;p&gt; tags in the actual database field]]></description>
    <pubDate>05/01/04, 122 03 2004 2004:%i:1083441825 16:03:45</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p789</guid>
   </item>
     <item>
    <title>Mountie  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p790</link>
    <description><![CDATA[<blockquote><strong>Vladimir said:</strong><br />
Is there a character limit on a database entry, something like 255? Because a poem won't fit then....</blockquote><br /><br />It depends on the way your table was set up. &nbsp;Most DB implementations allow you to specify the type and size of data to be stored in a particular field. &nbsp;For example, MS Access allows you to do text fields up to 255 characters, as well as Memo fields with up to several thousand characters. &nbsp;Check your particular DB's documentation for specifics.]]></description>
    <pubDate>05/04/04, 125 26 2004 2004:%i:1083680788 10:26:28</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p790</guid>
   </item>
     <item>
    <title>Vladimir  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p791</link>
    <description><![CDATA[I use MySQL, and I created a TEXT field to include the poems. However, in the inserting page, even though the line breaks show in the textbox, &nbsp;the line breaks are gone when I extract it out of the database.<br /><br />My only solution right now is to add &lt;br /&gt; s right in the fields...but that is not practical. &nbsp;<img src="/images/emoticons/sidesmile.png" class="smiley" />]]></description>
    <pubDate>05/17/04, 138 22 2004 2004:%i:1084767755 00:22:35</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p791</guid>
   </item>
     <item>
    <title>Jdenny  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p792</link>
    <description><![CDATA[I would get it to automatically convert CR/LF to &lt;br /&gt; when it saves it into the DB.]]></description>
    <pubDate>05/26/04, 147 50 2004 2004:%i:1085583019 10:50:19</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p792</guid>
   </item>
     <item>
    <title>Terakris  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p793</link>
    <description><![CDATA[I would have got it to convert CR/LF from out of the database instead. This way, if you have an online admin screen where someone is inputing the data, they dont need to know to put in &lt;BR&gt; when they put a CR/LF in or even get worried when they start to see them in the admin screen.<br /><br />Depends on your setup really i guess.]]></description>
    <pubDate>05/26/04, 147 03 2004 2004:%i:1085583802 11:03:22</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p793</guid>
   </item>
     <item>
    <title>Vladimir  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p794</link>
    <description><![CDATA[Thanks for your suggestions. But what is CR/LF and how do you convert it to &lt;br /&gt;? I think doing that while displaying the data is a better idea then saving the &lt;br /&gt;s in the field.]]></description>
    <pubDate>05/27/04, 148 11 2004 2004:%i:1085641900 03:11:40</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p794</guid>
   </item>
     <item>
    <title>Terakris  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p795</link>
    <description><![CDATA[Carrage Return/Line Feed (or the equivilent of you pressing the return key).<br /><br />Not sure how to convert it in PHP as its not my best area... can do it in ASP if that helps! &nbsp;<img src="/images/emoticons/wink.png" class="smiley" />]]></description>
    <pubDate>05/27/04, 148 14 2004 2004:%i:1085656474 07:14:34</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p795</guid>
   </item>
     <item>
    <title>Terakris  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p796</link>
    <description><![CDATA[Found this... hope it helps:<br /><br />http://www.zend.com/manual/function.str-replace.php]]></description>
    <pubDate>05/27/04, 148 50 2004 2004:%i:1085673032 11:50:32</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p796</guid>
   </item>
     <item>
    <title>Jdenny  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p797</link>
    <description><![CDATA[I thought you said the database was not storing the CR/LF ? that's why I said convert before storage.<br /><br />If the database saves it all correctly with new-lines intact the simply wrap the oputput on the page in &lt;pre&gt; tags!]]></description>
    <pubDate>05/28/04, 149 38 2004 2004:%i:1085787532 19:38:52</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p797</guid>
   </item>
     <item>
    <title>Vladimir  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p798</link>
    <description><![CDATA[Ok thanks guys. I solved it. &nbsp;<img src="/images/emoticons/smile.png" class="smiley" />]]></description>
    <pubDate>05/29/04, 150 19 2004 2004:%i:1085815188 03:19:48</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p798</guid>
   </item>
     <item>
    <title>Scott Thompson said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p2526</link>
    <description><![CDATA[Pretty easy... i hope you solved it properly without XSS or SQL injection attacks?<br />
<br />
It SHOULD be something like:<br />
<br />
$text = htmlentities(mysql_real_escape_string($_POST[&#39;article&#39;]), ENT_QUOTES);<br />
<br />
and then you should insert $text in to the database. when you display it, to show the line spaces it should be like:<br />
<br />
print nl2br($article);<br />
<br />
Kind regards,<br />
Scott]]></description>
    <pubDate>11/13/08, 318 33 2008 2008:%i:1226583196 08:33:16</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/php_text/#p2526</guid>
   </item>
   </channel>
</rss