Re: cutting off zeros >> 10.00 to 10
| From: | Thomas Murphy | Date: | Wed, 06 Feb 2002 14:18:38 +0000 |
| Subject: | Re: cutting off zeros >> 10.00 to 10 | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16555@lists.php.net to get a copy of this message | ||
Hello Mike,
Mike Maltese wrote:
>
> I tested this and it seems to work:
>
> $n = 1.90;
>
> for($i=strlen($n);$i<0;$i--){
> if(substr($n,$i,1) == "0"){
> $n = substr($n,0,(strlen($n))-1);
> }else{
> break;
> }
> }
>
> No charge...this time. =)
thank you very much. :)
bye,
Thomas Murphy