Jump to content
php.lv forumi

preg_replace un divi "enter"


ray

Recommended Posts

atkal ar lielgabalu :)

 

$blah = str_replace("\r\n", '<br />', $blah);

 

vēl perfomance uzlabot var, ja veic pirms tam pārbaudi:

 

if (strpos($blah, "\r\n") !== false) {
$blah = str_replace("\r\n", '<br />', $blah);
}

Edited by Paulinjsh
Link to comment
Share on other sites

×
×
  • Create New...