Results 1 to 10 of 42

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

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #23
    Join Date
    Feb 2007
    Posts
    26,214

    Default

    DAY 4 PHP PROGRAMMING

    http://php.flashwebhost.com/tom/if_else_greater_bug.php

    Code:
    <?php
    
    $passMark = '35';
    $studentName = 'Tom';
    $studentMark = '35';
    
    
    if ($studentMark >= $passMark) {
    
    
    echo 'Congratulations ' . $studentName . ' ! You passed exam with ' . $studentMark . ' marks' ;
    
    
    }
    
    
    else
    
    
    {
    
    
    echo 'Sorry! You failed. Good luck next time.' ;
    
    
    }
    Last edited by vineesh; 05-14-2014 at 11:31 AM.

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
  •