i have a assignment help please!

Discussion in 'PHP' started by asadbashir, Jul 8, 2008.

  1. #1
    Hy guys,

    i am a newbie in php language. please can u help me how i can make (table of 2) with help of (while and for loops) can use if else functions.

    the output should be like this...

    2 X 1 = 2

    2 X 2 = 4

    2 X 3 = 6

    2 X 4 = 8
    so on....
    .
    .
    .
    .
    .
    2 X 10 = 20

    please give me the full source of php to do this... thanks in advance... :).. muah love u all...
     
    asadbashir, Jul 8, 2008 IP
  2. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What's the use of taking the subject?
     
    Dondon2d, Jul 8, 2008 IP
  3. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Danltn, Jul 8, 2008 IP
  4. asadbashir

    asadbashir Banned

    Messages:
    100
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks Man....

    Many many thanks..
     
    asadbashir, Jul 8, 2008 IP
  5. singh.ajit05

    singh.ajit05 Peon

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    <?php
    for ($i=1;$i<=10;$i++)
    {

    echo "2 x ".$i." = ".(2*$i)."<br>";
    }

    ?>
     
    singh.ajit05, Jul 8, 2008 IP