• The Facebook Platform

Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2010
    Location
    Lahore, Pakistan
    Age
    25
    Posts
    3,818
    Points
    6,772.51
    Rep Power
    10000

    Default 06 - Numbers & Floats in PHP - PHP/MySQL in Urdu





    Numbers

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Numbers & Floats in PHP</title>
    </head>
    
    <body>
    
    <?php 
    $num1 = 4;
    $num2 = 2;
    
    ?>
    Math : <?php echo((1+2+$num1)*$num2); ?><br />
    += : <?php $num2 +=4; echo($num2); ?><br />
    -= : <?php $num2 -=4; echo($num2); ?><br />
    *= : <?php $num2 *=4; echo($num2); ?><br />
    /= : <?php $num2 /=4; echo($num2); ?><br />
    
    Increment :  <?php $num2++; echo($num2); ?><br />
    Decrement :  <?php $num1--; echo($num2); ?><br />
    
    
    
    
    
    
    
    </body>
    </html>
    Floats

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Numbers & Floats in PHP</title>
    </head>
    
    <body>
    
    <?php 
    $num1 = .005;
    $num2 = .900;
    
    ?>
    Math : <?php echo((1+2+$num1)*$num2); ?><br />
    += : <?php $num2 +=4; echo($num2); ?><br />
    -= : <?php $num2 -=4; echo($num2); ?><br />
    *= : <?php $num2 *=4; echo($num2); ?><br />
    /= : <?php $num2 /=4; echo($num2); ?><br />
    
    Increment :  <?php $num2++; echo($num2); ?><br />
    Decrement :  <?php $num1--; echo($num2); ?><br />
    
    
    
    
    
    
    
    </body>
    </html>






    Last edited by Їийоcёйт Кїllєґ; 10-27-2013 at 03:33 AM.
    Find Me On Social Networks

    Facebook | Twitter | Google+


  2. #2
    Join Date
    Jan 2010
    Location
    Lahore, Pakistan
    Age
    25
    Posts
    3,818
    Points
    6,772.51
    Rep Power
    10000

    Default

    Uploaded to Dailymotion
    Find Me On Social Networks

    Facebook | Twitter | Google+



 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •