Run ❯
Get your
own PHP
server
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <?php $str = "Jane & 'Tarzan'"; echo htmlspecialchars($str, ENT_COMPAT); // Will only convert double quotes echo "<br>"; echo htmlspecialchars($str, ENT_QUOTES); // Converts double and single quotes echo "<br>"; echo htmlspecialchars($str, ENT_NOQUOTES); // Does not convert any quotes ?> </body> </html>
Jane & 'Tarzan'
Jane & 'Tarzan'
Jane & 'Tarzan'