alarik149 Posted May 13, 2007 Share Posted May 13, 2007 hi people.I want to divide 2 numbers and to get the full integer of the result,not with comas.for example i wnt to divide 10 with 3 and i want the result to be 3 ,not 3,1 or whatever it is...I knew this kind of things I just can't remember it:(.it was the oposite of % Quote Link to comment https://forums.phpfreaks.com/topic/51157-how-to/ Share on other sites More sharing options...
chigley Posted May 13, 2007 Share Posted May 13, 2007 round() <?php echo round(3.4); // 3 echo round(3.5); // 4 echo round(3.6); // 4 echo round(3.6, 0); // 4 echo round(1.95583, 2); // 1.96 echo round(1241757, -3); // 1242000 echo round(5.045, 2); // 5.05 echo round(5.055, 2); // 5.06 ?> Quote Link to comment https://forums.phpfreaks.com/topic/51157-how-to/#findComment-251861 Share on other sites More sharing options...
alarik149 Posted May 13, 2007 Author Share Posted May 13, 2007 hmm,thank you vety much:) Quote Link to comment https://forums.phpfreaks.com/topic/51157-how-to/#findComment-251867 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.