ho to remove the fraction from any number ?

Discussion in 'PHP' started by ramysarwat, Jan 20, 2010.

  1. #1
    how can i remove the fraction from any number

    for examble

    3.3 become 3
    3.9 also become 3

    so i just want to remove the fraction
     
    ramysarwat, Jan 20, 2010 IP
  2. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Either of these will work
    echo (int) 3.7;
    echo floor(3.7);
    PHP:
     
    JAY6390, Jan 20, 2010 IP