[development] parseJson behaves differently under PHP 5.0

Dan Robinson dan at civicactions.com
Tue May 2 19:12:52 UTC 2006


Folks,

I am doing some AJAX stuff and it looks like parseJson may be handling
arrays differently between PHP 4.x and 5.x.


When using parseJson this is dumped under PHP 4.x

{ 0: { 0: "47", 1: "-122", 2: "Mr Dan Robinson" }, 1: { 0: "47.5", 1:
"-122.5", 2: "dan at foobar.org" }, 2: { 0: "47.75", 1: "-122.6", 2:
"George Robinson" } }


and this in 5.x

[ [ "44.4966", "-75.073", "Mr Anne C Jones Jr" ], [ "32.2153",
"-98.208", "Mrs Sheila X Yadav Sr" ], [ "34.9967", "-85.2375", "Dr
Michael M Patel Jr" ] ]

Different data obviously - same code.

Hints appreciated,

Dan



More information about the development mailing list