php special characters in string code example
Example 1: html special characters php
$string = "This is testing message "ETC" ";
htmlspecialchars($string, ENT_COMPAT)
Example 2: php quotations within quotations
<?php
echo '<span onclick="$(this).addClass(\'selected\');"> </span>';
?>