Result Size:
625 x 571
tryphp_func_string_htmlspecialchars2.php:
<!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'