0

I have a php file which is taking values from mysql. I want to put all the values of my php file into xcode arrays. My php file returns data in 3 columns: "ID", "Name", and "Message". How can I load this data into my xcode array?

My php output is:

[{"id":"7","Name":"Benedict","Message":"IT Support Engineer"},{"id":"6","Name":"Naushad","Message":"IT Support"}]

I want to put the data from each column into different arrays, i.e. IDs should be in the myid array, names should be in the myname array, and messages should be in the mymessage array.

I would really appreciate your help as I have been trying to solve this problem for the last week.

Thanks

0

2 Answers 2

1

JSONKit (https://github.com/johnezang/JSONKit/).

Sign up to request clarification or add additional context in comments.

Comments

0

If you're using iOS 5 or above you can use the inbuilt JSON serializer.

http://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40010946

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.