I want to send string array to php by Json and retrieve there.
String[] Books = {"book1", "book2", "book3", "book4",..};
In Json:
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>;
nameValuePairs.add(new BasicNameValuePair("books", Books));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
...
In php side:
$books = $_POST['books'];
$result = json_decode($books); // is this OK?
Or Can I use it like below?
$book1 = $result[0];
$resultand array or not. IsnameValuePairs.add(new BasicNameValuePair("books", Books));a good method for sending string array or should I usenameValuePairs.add(new BasicNameValuePair("books", Books[]));here?