php - Getting data from page to program -
I have UISplitView
and I want to populate the controller on the left with values from a database I am trying. I have this phpcode.
$ query = "select name from country"; $ Result = mysql_query ($ query); While ($ line = mysql_fetch_assoc ($ result)) {$ json_output [] = $ line; } Echo json_encode ($ json_output);
However, when I come to my iOS app, I have this code in my viewDidLoad
NSURL * myURL = [NSURL URLWithString : @ "Http://www.mywebsite.com/index.php"]; NSArray * test = [[NSArray alloc] initWithContentsOfURL: myURL]; Typear = [[NSMUTABARARAOL] INNTH WITH CONTENT OFF URL: TEST];
and cellforRowAtIndexpat
I added
cell.textLabel.text = [TypesArray objectAtIndex: indexPath.row]; Therefore, when I run my program, I hope to see my values listed in the leftviewcontroller
, but sadly it appears to be empty. NSLog
also appears blank, some help wants why my values are not being added to my app thanks
NSMutableURLRequest * Request = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: @ "
Where JSONDecoder can take you by link
Comments
Post a Comment