When converting new line characters to HTML break (<br>)
What is Cleaner to use?
str_replace(array("\r\n", "[br]", "\r"), '<br>', $Content);
OR
str_replace("\r\n", '<br>', $Content);
str_replace("[br]", '<br>', $Content);
str_replace("\r", '<br>', $Content);
I've been using the first method, but a friend of mine said that the way I currently use is more sloppy in terms of processing.
I'm using the formatting in a function; so
function Formatting ($Content)
{
$Content = str_replace(array("\r\n", "[br]", "\r"), '<br>', $Content);
return $Content;
}