Re: [SMARTY] Replace "." in a float-var
| From: | Robert Amos | Date: | Sat, 09 Nov 2002 16:26:01 +0000 |
| Subject: | Re: [SMARTY] Replace "." in a float-var | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6379@lists.php.net to get a copy of this message | ||
$string = str_replace('.', ' ', $float);
On Sat, 9 Nov 2002 17:22:59 +0100, Andreas Jud wrote:
> Hello,
>
> How can I replace simple the point in a float-variable with a space?
>
> i.e.
>
> $float = "12345.24";
> shoud be:
> $string="12345 24";
>
> I've tried:
> $string = (string) $float;
> $string = ereg_replace(".", " ", $string);
> but it didn't work! :(
>
>
> Thank you,
>
> Andy
>
>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>