
Originally Posted by
rameshxavier
Day 1 - My 3'rd post
http://php.flashwebhost.com/ramesh/study1.php
Code:
<?php
echo '<B><h1>My car is red!</h1></B>';
echo '<br>';
echo '<I><U><h1>My car is yellow!</h1></U></I>';
echo '<br>';
echo '<font color=green><I><U><h1>I have 2 car\'s!</h1></U></I></font>';
Here is an example of escaping string in PHP
Code:
echo '<font color=green><I><U><h1>I have 2 car\'s!</h1></U></I></font>';
echo 'String here';
If string itself contain a single quote, that need to be escaped with \ character like this
Bookmarks