2009/11/27 16:28

PHP function converts new line to BR tag


In case of displaying normal text having CR+LF character string on web browser, you may need to change it to <BR> tag.

PHP provides speedy converting function for supporting that. Following function is very useful.

Proto-type:
function nl2br( <source string> )

As you can expect by function name, it converts new line character set to <BR> tag.

Example)

.
.
.
$buf = nl2br( $source_string);
echo $buf;

1 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject Phentermine cheap.

    Tracked from Cheap phentermine. 2010/05/28 16:31 delete

    Phentermine cheap. Buy cheap phentermine online. Cheap phentermine online. Cheap phentermine cod. Cheap phentermine diet pill.