Ouzo\Utilities\Strings::escapeNewLines PHP 메소드

escapeNewLines() 공개 정적인 메소드

Example: $string = "My name is Reek \nit rhymes with leek"; $escaped = Strings::escapeNewLines($string); Result: My name is <strong>Reek</strong>
it rhymes with leek
public static escapeNewLines ( string $string ) : string
$string string
리턴 string
    public static function escapeNewLines($string)
    {
        $string = htmlspecialchars($string);
        return nl2br($string);
    }

Usage Example

예제 #1
0
function escapeNewLine($text)
{
    return Strings::escapeNewLines($text);
}
All Usage Examples Of Ouzo\Utilities\Strings::escapeNewLines