Page 1 of 2 12 LastLast
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
    Nov 2009
    Posts
    76,596

    Default

    Day 1 PHP programming

    http://php.flashwebhost.com/sherly/indian.php

    Code:
    <?php
    
    echo "I am an Indian!";

    Learning PHP





    Last edited by sherlyk; 05-08-2014 at 03:41 PM.

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

    Default

    Quote Originally Posted by sherlyk View Post
    Day 1 PHP programming

    http://php.flashwebhost.com/sherly/indian.php

    Code:
    <?php
    
    echo "I am an Indian!";
    
    ?>

    Don't use closing tag for PHP only code.

    Code:
    <?php
    
    echo "I am an Indian!";
    This is fine.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  3. #3
    Join Date
    Oct 2003
    Location
    Kochi, Kerala, India
    Posts
    21,389

    Default

    Day 1 - Another post

    http://php.flashwebhost.com/vineesh/myoffice.php

    My Code:
    Code:
    <?php
    
    echo 'I am <b>Vineesh Mohan</b>. <br /> <br /> Working in <b><I>
    <a href="http://www.FlashWebHost.com">FlashWebHost.com</a></I></b> <br /> <br />
    My collegues are <br /><br /> 
    <b>Tom <br /> Sherly <br /> Annie <br /> Sibichan <br /> Suneesh <br /> Steephan <br /> Ramesh <br /> and Mini</b>';
    Is there any other way to insert line breaks in php ?

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

    Default

    PHP don't have line breaks. You have to use HTML <br>

    HTML 5, you don't need to close Tags like img, br. So just use <br> instead of <br />
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  5. #5
    Join Date
    Oct 2003
    Location
    Kochi, Kerala, India
    Posts
    21,389

    Default

    Ok, now my code is:

    Code:
    <?php
    echo 'I am <b>Vineesh Mohan</b>. <br> <br>
    Working in <b><I><a href="http://www.FlashWebHost.com">FlashWebHost.com</a></I></b> <br> <br>
    My collegues are <br><br> 
    <b>Tom <br> Sherly <br> Annie <br> Sibichan <br> Suneesh <br> Steephan <br> Ramesh <br> and Mini</b>';

  6. #6
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    Day 1 - 2nd Post

    http://php.flashwebhost.com/sherly/animals.php

    Code:
    <?php
    
    echo 'Wild <b>Animals</b>. 
    Names are <br /><br /> 
    <b>Tiger <br /> Fox <br /> Elephant <br /> Rabbit <br /> Deer <br /> Wolf <br /> Cheetah <br /> and Horse </b>';


    Learning PHP


  7. #7
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    Day 1- 3rd post

    http://php.flashwebhost.com/sherly/thanksprayer.php

    Code:
    <?php
    
    
    echo '<h1><b><center>Prayer</center></b></h1>' ;
    
    
    echo '<p>A prayer of thanks is something that every person should say everyday. Everyone has something that they are thankful for. Even if it is just getting out of bed every day. A simple prayer of thanks is: God of Love, I thank You for the people in my life who are easy to love. I thank You for my family and friends who understand my actions, who support me in my decisions, and whose presence can lift the burden of a thorny day. Help me with those who are difficult to love. Let me recognize their flaws and their dangers. But then let me remember your attitude toward them, and lead me to see them in the light of Your love. Amen.  </p>';

  8. #8
    Join Date
    Jan 2008
    Location
    india,kerala-god's own country
    Posts
    14,007

    Default

    Day 1 PHP programming

    http://php.flashwebhost.com/ramesh/1.php

    Code:
    <?php
    
    echo "hello i am ramesh now i am starting my php study";

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

    Default

    Quote Originally Posted by rameshxavier View Post
    Day 1 PHP programming

    http://php.flashwebhost.com/ramesh/1.php

    Code:
    <?php
    
    echo "hello i am ramesh now i am starting my php study";
    Good, try some more complicated code with multiple echo

    Code:
    <?php
    
    echo 'hello i am ramesh now i am starting my php study';
    echo '<br>';
    echo 'PHP is the best!';
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  10. #10
    Join Date
    Jan 2008
    Location
    india,kerala-god's own country
    Posts
    14,007

    Default

    Day 1 - Another post

    http://php.flashwebhost.com/ramesh/2.php

    Code:
    <?php
    
    echo 'My car is red!';
    echo '<br>';
    echo 'My car is yellow!';
    echo '<br>';
    echo 'I have 2 car\'s!';

Page 1 of 2 12 LastLast

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
  •