Re: [PHP] how to conver a string to float

2004-02-07 Thread Adam Bregenzer
On Sat, 2004-02-07 at 23:50, Michal Migurski wrote: > Another possibility is to pipe the expression to bc, which could do the > input check for you, and probably covers a lot of syntactic ground. > Slightly less resource-efficient, but you don't have to reinvent the > wheel (untested, unix only): >

Re: [PHP] how to conver a string to float

2004-02-07 Thread Michal Migurski
>> Is there a possibility to convert a string like "10*500" (parsed from a >> XML-File) to a float? When i try to store this String in a float >> variable it only coverts the "10" but nothing after the "*"-sign, but i >> need the result of this expresison... Is there a function to calculate >> such

Re: [PHP] how to conver a string to float

2004-02-07 Thread Jason Wong
On Saturday 07 February 2004 23:56, Sebastian wrote: > Is there a possibility to convert a string like "10*500" (parsed from a > XML-File) to a float? > When i try to store this String in a float variable it only coverts the > "10" but nothing after the "*"-sign, but i need the result of this > exp

Re: [PHP] how to conver a string to float

2004-02-07 Thread Galen
Look at: exec() Be careful if you don't control the input of course. -Galen On Feb 7, 2004, at 7:56 AM, Sebastian wrote: Is there a possibility to convert a string like "10*500" (parsed from a XML-File) to a float? When i try to store this String in a float variable it only coverts the "10" but

[PHP] how to conver a string to float

2004-02-07 Thread Sebastian
Is there a possibility to convert a string like "10*500" (parsed from a XML-File) to a float? When i try to store this String in a float variable it only coverts the "10" but nothing after the "*"-sign, but i need the result of this expresison... Is there a function to calculate such string express