Nl2br()

Jmnote (토론 | 기여)님의 2015년 9월 7일 (월) 18:23 판 (→‎같이 보기)
nl2br()

1 JavaScript

function nl2br(str){  
    return str.replace(/\n/g, "<br />");  
}

2 PHP

echo nl2br("Hello\nWorld");
# Hello<br />
# World

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}