general math

Discussion in 'PHP' started by demons-halo, Sep 24, 2009.

  1. #1
    if variable 1 = 1500
    and variable 2 = 1000
    how could i make php do the code so it can make variable 3 the sum of variable 1 minus variable 2

    i hope ive explained this right...??
     
    demons-halo, Sep 24, 2009 IP
  2. orionoreo

    orionoreo Peon

    Messages:
    145
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    $variable1 = 1500;
    $variable2 = 1000;
    
    //This is your math
    $variable3 = $variable1 - $variable2;
    
    
    PHP:
     
    orionoreo, Sep 24, 2009 IP
  3. demons-halo

    demons-halo Active Member

    Messages:
    243
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #3
    thank you very much :D
     
    demons-halo, Sep 24, 2009 IP