Learning PHP and MySQL

Example 03-16 Correct escaping of special characters

<?php
//  OK  because  we  used  single  quotes
echo  "<h2  class=\"specialH2\">Margaritaville!</h2>";
echo  
'<h2  class="specialH2">Margaritaville!</h2>';
?>

Posted by on 07/19 at 03:47 PM

Next entry: Example 03-17 Using strcmp to compare two stings

Previous entry: Example 03-15 Using echo with special characters

<< Back to main