title: Android POST JSON to PHP
body: <p><strong>Hi, i want to POST JSON to a PHP-Script.</strong>
  Here is the code:</p>
  
  <pre><code>JSONObject obj = new JSONObject();
  for(int k = 0; k&lt;len;k++){
     obj.put("nachrichten_ids", params[k]);
  }               
  HttpClient httpClient = new DefaultHttpClient();
  HttpPost httpPost = new HttpPost("xxxxxx");
  
  List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
  nameValuePairs.add(new BasicNameValuePair("nachrichten_ids",obj.toString()));
  
  httpPost.setHeader("Content-type", "application/json");
  httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  HttpResponse response = httpClient.execute(httpPost);   
  </code></pre>
  
  <p>The PHP Script contains actually only print_r($_POST),- <strong>and its empty every time.</strong></p>
  
  <p><strong>Where is the problem ?</strong></p>
  
  <p><strong>Log.i("TEST",obj.toString()) outputs:</strong>
  {"nachrichten_ids":"[2144,2138]"}</p>
  
  <p>Where each number are IDS for messages that should be deleted.</p>