Jump to content

Htmlentities()!


Mehdi

Recommended Posts

Hi,

I work on an ubuntu system with php 5.2.1.

The next code doesn't convert my string to entities!

Could you guide me please?

<html>
<head>
<title>Text including html</title>
</head>

<body>
<?php
echo phpinfo();
$str= <<<TEXT
Einstürzende Neubauten and Marya's & Mother and again "test".
TEXT;
$code=htmlentities($str, ENT_QUOTES);
$code1=htmlspecialchars($str);
echo $code,"<br>",$code1;
?>
</body>

</html>

Link to comment
https://forums.phpfreaks.com/topic/57716-htmlentities/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.