Re: problems with round ..

From: Date: Thu, 28 Jun 2001 08:33:32 +0000
Subject: Re: problems with round ..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55534@lists.php.net to get a copy of this message
This code works fine with PHP 4.0.5 on Win. <?php srand (microtime()); for ( $i = 0; $i < 1000 ; $i++) { $BLAH = rand() / 100; echo round($BLAH, 2), '<br>'; } ?> ----- Original Message ----- From: "Chad Day" <cday@atpco.com> To: <cczona@nospam.invalid>; <php-general@lists.php.net> Sent: 2001. június 27. 17:27 Subject: RE: [PHP] problems with round .. > Yes, it is. I've tried it on a couple different php4 servers, I've never > gotten it to work. > > Chad > > -----Original Message----- > From: CC Zona [mailto:cczona@nospam.invalid] > Sent: Tuesday, June 26, 2001 8:00 PM > To: php-general@lists.php.net > Subject: Re: [PHP] problems with round .. > > > In article <NFBBJEHDJOLEGDCDKEGGMENLCGAA.cday@atpco.com>, > cday@atpco.com ("Chad Day") wrote: > > > $BLAH = round($BLAH, 2); > > > > Spits out a wrong parameter error. I've tried quotes around the variable, > > the parameter, and any combinations, but it still pukes on me. Why can't > I > > specify a precision? > > According to the manual, the second parameter is only available in PHP4--is > that what you're using? > > -- > CC > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#55534) next »