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 % 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 ?> 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:) Link to comment https://forums.phpfreaks.com/topic/51157-how-to/#findComment-251867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.