11-14-2012 11:17 AM
I am currently struggling to figure something out, I've gone through the documentation millions of times, but either i'm blind or something.
I make a call to a php web service that gets data from a sql database, now my issue is, everything works fine, but I don't know how to reformat the data once it's been retreived from the web service.
Can someone please give me a short sample of how to do this, how must the php service format the data:
1) is Json better?
2) How do I write code that handles the json and does like a for each kinda thing?
This is what I currently have. It's formatted for XML, but I'm going to be transforming it into json if it's best.
This is what I currently get from the web service, as I said, how do I transform that?
There has to be a way, I mean, Facebook, twitter etc all work like this.