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

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?
Who is Participating?
DanielAttardConnect With a Mentor Author Commented:
I solved this issue by using the following:


Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.