Rustywolf Posted March 23, 2010 Share Posted March 23, 2010 Hey, say i wanted to multiply in PHP to get Pi <?php echo 22/7 //rougly ?> How would i limit the number of decimal places WHILE being multiplied cause, you know, pi goes on forever i want to find pi to X amount of decimal places Anyone? Link to comment https://forums.phpfreaks.com/topic/196201-limit-multiplication-to-x-amoutn-of-decimal-points/ Share on other sites More sharing options...
The Little Guy Posted March 23, 2010 Share Posted March 23, 2010 <?php echo round(22/7, 2); //rougly ?> Link to comment https://forums.phpfreaks.com/topic/196201-limit-multiplication-to-x-amoutn-of-decimal-points/#findComment-1030331 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.