Im using this piece of code:
<?php $newstring = preg_replace("/[\n\r]/", "<br />" , $googlemapsbox_text); echo $newstring; ?>
To replace the \n's. What I would like to achieve: limit the amount of <br /> per line, so when preg_replace finds more than 1 \n per line, they ALL should be replaced with ONE <br />.
I hope my question is clear to you, sorry for the weird English