mneed help regarding multiplying the values

Discussion in 'PHP' started by kcm4web, Mar 23, 2011.

  1. #1
    hi there
    i need a help regarding price multiply.pls see the image
    [​IMG]

    here quantity =1 and price is $40.00 . when i multiply it it shows $40 . but i need $40.00 . tell me how can i do this..pls help me
     
    kcm4web, Mar 23, 2011 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    $value = 40;
    echo sprintf("%01.2f", $value);
     
    bartolay13, Mar 23, 2011 IP
  3. AlesiBoss

    AlesiBoss Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    multiply that and then use number_format() function. cheers
     
    AlesiBoss, Mar 23, 2011 IP