Link to home
Start Free TrialLog in
Avatar of DanielAttard
DanielAttardFlag for Canada

asked on

Retrieve values from PHP array

I am trying to do a basic calculation in PHP, but I am getting an incorrect result.  I am trying to retrieve a number from an array, but for some reason it appears that the number returned is missing all of the digits after the comma.

For example, I am trying to retrieve 53,932 from the array, but when I cast using
(int)

Open in new window

the number returned is only 53.

Do I need to cast the value as an integer before trying to retrieve it from the array?
ASKER CERTIFIED SOLUTION
Avatar of DanielAttard
DanielAttard
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial