title: How to get php json_encode($array) in to android to manipulate it data?
body: <p>How to get php <code>json_encode($array)</code> in to android to manipulate it data?</p>
  
  <p>I have a php that encode a array in json_encode($array); and when i</p>
  
  <pre><code>echo json_encode($array);
  </code></pre>
  
  <p>i get:</p>
  
  <p><code>[{"id":"1","name":"player1","score":"20","quarter":"Q - 1"},{"id":"2","name":"player2","score":"18","quarter":"http:\/\/localhost\/win.jpg"}]</code></p>
  
  <p>Now in android i want to get that array from the php and put it in a array that let me take for example from index 0 with the key name the string value that it contains and then set that string to a textView text. In iphone i only do this code:</p>
  
  <pre><code>NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&amp;error];
  </code></pre>
  
  <p>(data is my local url "http://localhost/my.php")</p>
  
  <p>and then i can easy take the data from the dictionary with <code>valueForKey:name</code> and <code>objectAtIndex:0</code> and put it string to a textfield.</p>
  
  <p>Please complete code implementation in java so i can understand. Because i'm new in java and i'm losing my head with a lot of erros and hours trying to do this in different ways.</p>
  
  <p>Thanks to the one that resolve my problem.</p>