BandonRandon BandonRandon - 6 months ago 37
PHP Question

Working with an array with periods in key values

I'm getting data from an array. For some reason the array has key values like

which I'm having trouble retrieving data from.

I have this array
[3.3] => First Name [3.6] => Last Name[2] =>

When I try to call
it returns null, but when I call
I am given the e-mail. Any ideas?

Answer Source

Use single quotes when referencing the key value (basically treat it like a string, that's what PHP is probably doing)

echo $array['3.3'];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download