jkkenzie Posted May 3, 2008 Share Posted May 3, 2008 How do i calculate the square root of a number using php? Thanks. Joe Link to comment https://forums.phpfreaks.com/topic/103991-square-root-of-a-number/ Share on other sites More sharing options...
BrianM Posted May 3, 2008 Share Posted May 3, 2008 Something like this can easily be googled!!! Some people don't even take the time to look. >.> <?php echo sqrt(9); // 3 echo sqrt(10); // 3.16227766 ?> But there is an example. Link to comment https://forums.phpfreaks.com/topic/103991-square-root-of-a-number/#findComment-532363 Share on other sites More sharing options...
AndyB Posted May 3, 2008 Share Posted May 3, 2008 And the general case = pow() http://ca.php.net/manual/en/function.pow.php Link to comment https://forums.phpfreaks.com/topic/103991-square-root-of-a-number/#findComment-532364 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.