1 개요[ | ]
- PHP htmlentities()
PHP
CPU
0.0s
MEM
22M
0.0s
Copy
$str = "A 'quote' is <b>bold</b>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str);
A 'quote' is <b>bold</b>
PHP
Copy
$str = "A 'quote' is <b>bold</b>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str, ENT_QUOTES);
Loading
PHP
Copy
$str = "\x8F!!!";
// Outputs an empty string
echo htmlentities($str, ENT_QUOTES, "UTF-8");
Loading
PHP
Copy
$str = "\x8F!!!";
// Outputs "!!!"
echo htmlentities($str, ENT_QUOTES | ENT_IGNORE, "UTF-8");
Loading
PHP
Copy
var_dump( htmlentities("Änglagård") );
var_dump( htmlentities("★A가あ中") );
Loading
PHP
Copy
var_dump( htmlentities("&") );
var_dump( htmlentities("&") );
Loading
2 같이 보기[ | ]
- PHP html_entity_decode() - Convert HTML entities to their corresponding characters
- PHP get_html_translation_table() - Returns the translation table used by htmlspecialchars and htmlentities
- PHP htmlspecialchars() - Convert special characters to HTML entities
- PHP nl2br() - Inserts HTML line breaks before all newlines in a string
- PHP urlencode() - URL-encodes string
3 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.