Jump to content

[SOLVED] replacing two new lines with paragraph tags


The Little Guy

Recommended Posts

In my database, I have these lines:

This is line one! 

This is another line.

 

echo '<p>'.preg_replace("~\n\n~m", '</p><p>', $row['about']).'</p>';

 

When the above code runs, it doesn't replace two new lines with: '</p><p>' that I tell it to. Why not?

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.