Page 5 of 5 FirstFirst ... 345
Results 41 to 42 of 42

Thread: Day 4 - Decision Making - Become PHP Expert in 30 days

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

    Default

    PHP PROGRAMING DAY - 4 THIS IS MY 2'ND CODE

    http://php.flashwebhost.com/ramesh/day-4/if_greater.php

    PHP Code:
    <?php

    $laras_hundreds 
    54;

    $sachins_hundreds 100;

    $name_of_indian_cricketer ='Sachin';

    $name_of_westindian_cricketer ='Lara';

    if (
    $sachins_hundreds $laras_hundreds) {
        echo 
    'Congratulations ' $name_of_indian_cricketer '! You are better than Lara because you took '
        
    $sachins_hundreds ' centuries. ' $name_of_westindian_cricketer ' took 54 centuries only';
    Last edited by rameshxavier; 05-15-2014 at 10:32 AM.

  2. #42
    Join Date
    Sep 2003
    Location
    india
    Posts
    11,527

    Default

    http://php.flashwebhost.com/annie/if_else.php

    PHP Code:
    <?php

    $winningScore 
    200;

    $playerName 'Mariya';

    $palyerScore 240;

    if (
    $palyerScore $winningScore) {
       echo 
    'Congratulation ' $playerName '! You got ' $palyerScore ' Points. The minimum score is  ' $winningScore' . You are selected for next level.';
    } else { 
      echo 
    'Sorry!, Try again';
    }

Page 5 of 5 FirstFirst ... 345

Tags for this Thread

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
  •