RE: [PHP] computing 60/10 - how to?
| From: | Edward Kay | Date: | Mon, 08 Jan 2007 10:30:25 +0000 |
| Subject: | RE: [PHP] computing 60/10 - how to? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246749@lists.php.net to get a copy of this message | ||
You could use exec() but that's not good practice due to the security
implications.
I'd extract the two numbers using explode() on the / and then just use the
division operator.
Edward
> -----Original Message-----
> From: Merlin [mailto:ngroups@fastmail.fm]
> Sent: 08 January 2007 10:22
> To: php-general@lists.php.net
> Subject: [PHP] computing 60/10 - how to?
>
>
> Hi there,
>
> I do have a text value inside a variable: exif[FNumber] = 56/10 which I
> would like to save as a float value: 5,6 into a database.
>
> How can I compute this 56/10? I tried things like calculate() or math()
> but did not find the propper function to do this.
>
> Can anybody help, please?
>
> Thank you in advance,
>
> Merlin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>