Results 1 to 10 of 50

Thread: Day 2 - Variables - Become PHP Expert in 30 days

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2003
    Location
    Kochi, Kerala, India
    Posts
    21,389

    Default

    DAY 2 VARIABLES EXAMPLE 4

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

    My code is
    Code:
    <?php
    
    $numActors = 15;
    $numActress = 12;
    $number1 = 5; 
    $number2 = 10;
    $number3 = 15;
    
    echo '<p>' . 'Number of Actors ' . '= ' . $numActors . '</p>';
    
    echo '<p>' . 'Number of Actress ' . '= ' . $numActress . '</p>';
    
    echo '<p>' . 'Total number of film stars' . ' = ' . ($numActors + $numActress) . '</p>';
    
    echo '<br> <br>';
    
    echo '<p>' . 'The sum of ' . $number1 . ' + ' . $number2 . ' is ' . '= ' . $number3 . '</p>';

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

    Default

    DAY 2 VARIABLES POST 3


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

    Code:
    <?php
    
    $film = 'Gangster';
    
    echo  'Film: ' . $film; echo '. <br>';
    
    $actor = 'Mammootty';
    
    echo  'Actor: ' . $actor; echo '. <br>';
    
    $actress = 'Nyla Usha';
    
    echo  'Actress: ' . $actress; echo '. <br>';
    
    $director = 'Aashiq Abu';
    
    echo  'Director: ' . $director; echo '. <br><br>'; 
    
    $actress1 = 'Aparna Gopinath';
    
    
    echo 'The ' . $film . ' is a Malayalam film , '  . $film . ' directed by ' . $director . ', ' . $actor . ' plays the lead role as Akbar Ali Khan'; echo '.';
    
    echo '<br> <br>';
    
    echo 'Along with ' . $actress . ' and ' . $actress1 . ' as the female leads'; echo '.';

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
  •