title: Dynamic content from JSON only posts/repeats last key's data (should print all values)
body: <p>I have a UITableView (and UITableVIewCell) that I'm populating via JSON/MYSQL database. There are 10 sets of data (each containing 3 pieces of data) being called in my PHP. My UITableView is set up to post 3 of the sets. 3 sets of data are printed in my table, however, they are all the same piece of data. How can I make it print the most recent 3 sets?</p>
  
  <p><strong>MainTableController.m</strong></p>
  
  <pre><code>@implementation MainTableViewController
  @synthesize textNeedTitle, textNeedPoster ,textNeedDescrip;
  
  -(IBAction)unwindToRootVC:(UIStoryboardSegue *)segue
  {
      // Nothing needed here.
  }
  
  - (id)initWithStyle:(UITableViewStyle)style
  {
      self = [super initWithStyle:style];
      if (self) {
          // Custom initialization
      }
      return self;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      // Uncomment the following line to preserve selection between presentations.
      // self.clearsSelectionOnViewWillAppear = NO;
  
      // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
      // self.navigationItem.rightBarButtonItem = self.editButtonItem;
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  #pragma mark - Table view data source
  
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      // Return the number of sections.
      return 1;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      // Return the number of rows in the section.
      return 3;
  }
  
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      TestTableViewCell *cell = (TestTableViewCell *) [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
  
      NSURL *myURL = [[NSURL alloc]initWithString:@"http://domain.com/json2.php"];
      NSData *myData = [[NSData alloc]initWithContentsOfURL:myURL];
      NSError *error;
      NSArray *jsonArray = [NSJSONSerialization JSONObjectWithData:myData options:NSJSONReadingMutableContainers error:&amp;error];
  
  
      if(!error)
      {
          for (NSDictionary * needs in jsonArray)
          {
              cell.textNeedTitle.text = [needs objectForKey: @"needTitle"];
              cell.textNeedPoster.text = [needs objectForKey: @"needPoster"];
              cell.textNeedDescrip.text = [needs objectForKey: @"needDescrip"];
          }
      }
  
      else
      {
          textNeedTitle.text = [NSString stringWithFormat:@"Error--%@",[error description]];
      }
      return cell;
  }
  </code></pre>
  
  <p>My PHP is setup to call the most recent 10 posts, but is there an added necessary code I'm missing in my Objective C?</p>