컴

htmlspecialchars_decode - 특수 HTML 엔터티를 다시 문자 로 변환합니다.

· 2017-03-11 (토) 23:35:39 · 2741

htmlspecialchars_decode - 특수 HTML 엔터티를 다시 문자 로 변환합니다.

 

설명 ¶

 

string htmlspecialchars_decode ( string $string [, int $flags= ENT_COMPAT | ENT_HTML401 ])

이 함수는 htmlspecialchars () 의 반대입니다 . 특별한 HTML 엔터티를 다시 문자로 변환합니다.

 

변환 된 엔티티는 & amp; , " ( ENT_NOQUOTES설정되지 않은 경우), & # 039; (언제 ENT_QUOTES설정 되는지 ), & lt; 그리고 한다 .

 

<?php

$str = "<p>this -> "</p>\n";

 

echo htmlspecialchars_decode($str);

 

// note that here the quotes aren't converted

echo htmlspecialchars_decode($str, ENT_NOQUOTES);

?>

위의 예제는 다음과 같이 출력됩니다 :

 

<p> this -> "</ p>

<p> this -> & quot; </ p>

|
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
jQuery 17-03-18 조회 2,826
jQuery 17-03-18 조회 2,408
PHP 17-03-18 조회 4,443
jQuery 17-03-17 조회 2,267
jQuery 17-03-17 조회 2,310
jQuery 17-03-17 조회 2,174
jQuery 17-03-17 조회 3,166
PHP 17-03-16 조회 2,425
PHP 17-03-16 조회 2,255
PHP 17-03-16 조회 2,462
기타 17-03-16 조회 1.6만
OS 17-03-16 조회 3,542
jQuery 17-03-15 조회 2,599
jQuery 17-03-15 조회 2,667
jQuery 17-03-15 조회 2,769
jQuery 17-03-14 조회 2,564
jQuery 17-03-14 조회 2,697
jQuery 17-03-14 조회 3,647
PHP 17-03-13 조회 2,606
PHP 17-03-13 조회 2,401
PHP 17-03-13 조회 2,669
PHP 17-03-11 조회 2,390
PHP 17-03-11 조회 3,080
PHP 17-03-11 조회 2,742
jQuery 17-03-11 조회 2,750
jQuery 17-03-11 조회 2,842
jQuery 17-03-11 조회 2,264
jQuery 17-03-10 조회 2,275
jQuery 17-03-10 조회 2,266
jQuery 17-03-10 조회 2,650