Re: [PHP] Variable stores incomplete values...
$variable = This is the data.This is the data.This is the data.This is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the data This is the dataThis is the dataThis is the data This is the; da;taThi's is the dataThis is the dataThis is the data This is the dataThis is the dataThis is the dataThis is the data I mean to say taht it is kidof formatted with REturn character, space characters, ', ; and a lot many characters... Now my question is that. If I store the variable in MYSQL dataabse under a particular filed TYPe varchar or TEXT. It doesn't bring up the same kind of format like it was when it was stored.. Is there any way I can get the same output like I stored it.? Use http://php.net/addslashes maybe... If it's varchar(XX) and your string is longer than XX, you will lose the end of the string. If you're not sure how long it might be, just use TEXT in MySQL. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variable stores incomplete values...
Your question encompasses two parts... the subject says these variables are storing incomplete values and later in the email you state mySQL isn't maintaining the formatting of your data. The first part is possible because your mySQL database field may not be declared big enough to actually hold the data. AFAIK there is no limit on actual variable size, as long as the server has enough memory, it should be fine. Your second question about formatting... well the answer is the formatting is most likely in the database, but when you retrieve it and siaplay it ina browser, well the browser doesn't understand anything other than HTML. So carriage returns, line feeds, tabs, etc... never get displayed. If you want the formatting to be kept in the browser, convert the data. A good starting place is nl2br() At 02:22 AM 2/19/01 -0600, Richard Lynch wrote: $variable = This is the data.This is the data.This is the data.This is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the data This is the dataThis is the dataThis is the data This is the; da;taThi's is the dataThis is the dataThis is the data This is the dataThis is the dataThis is the dataThis is the data I mean to say taht it is kidof formatted with REturn character, space characters, ', ; and a lot many characters... Now my question is that. If I store the variable in MYSQL dataabse under a particular filed TYPe varchar or TEXT. It doesn't bring up the same kind of format like it was when it was stored.. Is there any way I can get the same output like I stored it.? Use http://php.net/addslashes maybe... If it's varchar(XX) and your string is longer than XX, you will lose the end of the string. If you're not sure how long it might be, just use TEXT in MySQL. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Variable stores incomplete values...
Hi! I need help with this one. See I store a lot of data into one variable like this: $variable = This is the data.This is the data.This is the data.This is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the data This is the dataThis is the dataThis is the data This is the; da;taThi's is the dataThis is the dataThis is the data This is the dataThis is the dataThis is the dataThis is the data I mean to say taht it is kidof formatted with REturn character, space characters, ', ; and a lot many characters... Now my question is that. If I store the variable in MYSQL dataabse under a particular filed TYPe varchar or TEXT. It doesn't bring up the same kind of format like it was when it was stored.. Is there any way I can get the same output like I stored it.? Thank YOu! Dhaval Desai __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]