Hello, how to display text from the database without extra spaces and hyphenation?
I tried the function n2lbr - it does not help, you can do between two lines, at least 100 transfers
Hello, how to display text from the database without extra spaces and hyphenation?
I tried the function n2lbr - it does not help, you can do between two lines, at least 100 transfers
The answer is already here :
$string = trim(preg_replace('/\s\s+/', ' ', $string)); Alternative without regular expressions (all from the same place):
$string = str_replace(array("\r\n","\r"),"",$string); Source: https://ru.stackoverflow.com/questions/617978/
All Articles