PHP and numbers problem
Posted: Mon Apr 18, 2005 6:28 am
Situation is as follows:
I have number 10, and I want it 20 times to multiply it self and after each time it does so, to write the result on the page.
After some time(s) it does not output plain "100000000000000000000" format but "1.E+20".
This comes to me as a big problem because of this code:
Outputs: "20" as an integer - it outputs the value of the exponent, and that is what I don't need - anyone has an idea how to beat this problem.
My question is how to instruct ( or prevent ) php to present in this way.
Been looking in the php.ini and httpd.conf, no luck.
PHP 5, Apache 1.23.xx ( I think - for apache ).
Thanks Ahead !
I have number 10, and I want it 20 times to multiply it self and after each time it does so, to write the result on the page.
After some time(s) it does not output plain "100000000000000000000" format but "1.E+20".
This comes to me as a big problem because of this code:
Code: Select all
$the_number_above = /* ex. */ 100000000000000000000
echo $slice_the_end = substr( $the_number_above, -2 );My question is how to instruct ( or prevent ) php to present in this way.
Been looking in the php.ini and httpd.conf, no luck.
PHP 5, Apache 1.23.xx ( I think - for apache ).
Thanks Ahead !