<?php // $content is whatever the string is which contains the line breaks $contentArr = explode( '<br />', $content ); foreach( $contentArr as $paragraph ) { echo '<p>' . $paragraph . '</p>'; };?>
$content = str_replace( '<br>','<p>',$content );
However, I want to convert the line breaks to paragraphs. Any ideas on how do I do this?
Thanks.
saves a few opcodes.
jamy_za's solution works as well, of course.