Hi, I'm relatively new to php. I got stuck on syntax to perform some calculations on server side. In particular, I'm trying to calculate a log and round the number to 0 decimal places, here are the details but I can't get it to work:
<? php
$q = 360/$_POST['thenumber'];
$z= round(float log(float$q [, 2]));
?>
$_POST['thenumber'] is a number from a form passed to a current page (well, should be a number...)
I need to divide 360 by 'thenumber'
returned $q variable to be used in logarthmic calculation - base 2
$z variable to be the whole number only (to be used in another part of the script)
Any assistance much appreciated.