troubleshooting Question

Getting rid of Carriage return when processing MySQL Data in PHP

Avatar of swhitlow
swhitlow asked on
PHPMySQL ServerJavaScript
20 Comments1 Solution984 ViewsLast Modified:
I have a field in a database that has a carriage return. It is an address (although it could be anything) and it is the following two lines:
8923 Chowsnik Dr.

If you take the two lines above, you will also take the empty line that it has below the address as well. This is what is in the database.

Now, in php, I need to eliminate this extra carriage return white space. I have tried trim, str_replace(\n\r, etc...

But, nothing seems to work. I am using the return along with a jquery flexigrid control and this is what is not liking that extra carriage return.

So, is there anything I can do to get rid of this dead space at all?

Thanks!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 20 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros