<?php $textbefore = "text has newlines in wo\nrds and normal newlines \n bewtween words and again in wo\nrds"; $textafter = preg_replace( "/(?<=\S)\n|\n(?=\S)/", '', $textbefore); var_dump( $textafter);
You have javascript disabled. You will not be able to edit any code.