Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: STR Data breaking table need help please
markh
Junior Member

Posts: 6
Registered: 8/20/2010
Location: Chicago
Member Is Offline
posted on 9/16/2010 at 06:04 PM Reply With Quote
STR Data breaking table need help please


I have a table with a field called comments and it has data like this:

var TABLE_CONTENT = [["2009/05/20 13:48:00", "added: Sent email to MessageLabs.
Line Break in text
another line feed ", "10030798"],


I'm using PHP to pull the data from Oracle and I generate the TABLE_CONTENT that way. What can I do to make the table work with this kind of data?

htmlspecialchars doesn't fix it.

Any help would be awesome, thanks in advance.

Mark
View User's Profile View All Posts By User U2U Member
markh
Junior Member

Posts: 6
Registered: 8/20/2010
Location: Chicago
Member Is Offline
posted on 9/17/2010 at 03:38 PM Reply With Quote

I have a temporary fix, it looks like I had to do a simple str_replace("\n","",$string); and str_replace("\r","",$string); To get it to work, so new lines and carriage returns breaks the tables. Any way around this or do I have to remove them?

Thanks in advance,

Mark
View User's Profile View All Posts By User U2U Member
markh
Junior Member

Posts: 6
Registered: 8/20/2010
Location: Chicago
Member Is Offline
posted on 9/17/2010 at 06:57 PM Reply With Quote

OK It's fixed now,

instead of doing a str_replace("\\r","",$string) I did a str_replace("\\r","<br/>",$string) This maintaines the line breaks and carriage returns.

Hope this helps someone else
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Simple
XP-styled
3D designed
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004