Results 1 to 10 of 31

Thread: Day 1 - Getting Started - Become PHP Expert in 30 days

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    india,kerala-god's own country
    Posts
    14,007

    Default

    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>';
    Last edited by rameshxavier; 05-09-2014 at 07:09 AM.

  2. #2
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Quote Originally Posted by rameshxavier View Post
    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

    Code:
    car\'s!
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •