Jump to content

Recommended Posts

I am trying to grab information from a website via PHP and when I do so there are line breaks in the source of the page. I've tried to replace \n and it didn't work.  Is there a way to remove "phantom" line breaks?  Did that even make sense? haha

 

It's like viewing the source of a page.  You see that there are new lines, but no function telling it to do so.

Link to comment
https://forums.phpfreaks.com/topic/130319-remove-new-lines-that-arent-n/
Share on other sites

Pardon? Not fully understanding you.

 

Are you saying your newlines are not being displayed? If so you'll need to convert newlines to <br /> in order for then to display on your page. PHP has a built in function which handles this for you called nl2br()

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.