Jump to content

string replace carriage return


ldsmike88

Recommended Posts

I am passing a variable from php to a javascript function. It is a couple of paragraphs worth of text and javascript wont take it if there are any line breaks in it. I figured I could use a string replace to take out all the carriage returns and that would solve the problem but when I do that it puts my replacement where there is a line break but it doesn't take out the line break. Does anyone know why and how to fix it? Thanks!

Michael
Link to comment
https://forums.phpfreaks.com/topic/26901-string-replace-carriage-return/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.