У меня есть строка, которая выглядит точно так же, как это:Удалить Странные Разрывы строки - PHP
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book.
Есть ли способ сделать это выглядит в PHP?
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
Где целая фраза находится на одной линии? И абзацы сохраняются?
Обновление: Я нашел этот инструмент, который делает это отлично. Но, очевидно, его нельзя использовать. http://www.textfixer.com/tools/remove-line-breaks.php
дать этому попытку: 'str_replace (массив ("\ г", "\ п"), '', $ строка)' где '\ r' = return и' \ n' = новая строка. поэтому он удалит все строки возврата и строки новой строки из строки. –
Попробуйте preg_replace («/ \ r | \ n /», «", $ yourString); но если вы смотрите на скорость, str_replace (array ("\ r", "\ n"), '', $ yourString; это ваш лучший выбор –
@mistermartin Он удаляет все разрывы строк, но не разделяет абзацы. – Taurian