PHP 웹프로그래밍
[문자열함수] htmlentities() html 태그를 그대로 출력하는 함수
htmlentities() html 태그를 그대로 출력하는 함수입니다.
string htmlentities(string str);
<?
$a = "<font size=4>";
$b = "</font>";
echo $a."Helle PHP".$b."<br>";
echo htmlentites($a)."Hello PHP".htmlentites($b);
?>
Hello PHP
<font size=4>Hello PHP</font>
string htmlentities(string str);
<?
$a = "<font size=4>";
$b = "</font>";
echo $a."Helle PHP".$b."<br>";
echo htmlentites($a)."Hello PHP".htmlentites($b);
?>
Hello PHP
<font size=4>Hello PHP</font>