If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Yes, the comma will cause a problem, as PHP numeric types to not any commas. In this case, it's considered a string, and when it tries to type-cast it to a number, it only reads the first character (the "1"), then stops when it reaches anything that is not a number of a decimal point (the comma).

In words, it checks whether there is a comma anywhere in $data2['value'] and if so, it replaces it with "" (nothing). Since it's still technically a String, the result is then explictly casted to a float so you can use it for calculations. PHP probably will implicitly cast it for you but I like being specifying it.