How to insert an ArrayList to mysql using Volley

I want to insert an ArrayList that contain some String and some integer into MySQL using Volley in android. This is how I want to send my array in android. I dont know if this is right or not.

@Override
public Map<String, String> getHeaders() throws AuthFailureError {
    Map<String, String> params = new HashMap<String, String>();
    params.put("Authorization", user.getApikey());
    return params;
}

@Override
protected Map<String, String> getParams() throws AuthFailureError {
    Map<String,String> params = new HashMap<>();
   for(int i=0; i<wordlist.size();i++){
       params.put("word_id["+i+"]",String.valueOf(wordlist.get(i).getWord_id()));
       params.put("word["+i+"]",wordlist.get(i).getWord());
       params.put("translation["+i+"]",wordlist.get(i).getTranslation());
       params.put("english["+i+"]",wordlist.get(i).getEnglish());

   }
   return params;
}

The problem is I have no idea how to get an ArrayList in PHP with POST data and how to use it to insert my data to MySQL. I would be really grateful if some body tell me how to handle PHP part with example and even if I am doing right in android part or not.

Answer

@Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put("Authorization", user.getApikey());
return params;
}

@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String,String> params = new HashMap<>();
params.put("list",wordlist);
return params;
}

Then in your PHP side

 $list = $_POST["list"];
 for($i=0;$i<count($list);$i++){
//do something
}

EDITED

 public void sendSomeToSql(){
    final JSONObject data = new JSONObject();
    JSONArray array = new JSONArray();
    JSONObject ok = new JSONObject();
    for (int i = 0; i < wordlist.size(); i++) {
        ok.accumulate("list", wordlist.get(i));
    }
    array.put(ok);
    try {
        data.accumulate("list", array);
    } catch (JSONException e) {
        e.printStackTrace();
    }
    StringRequest request = new StringRequest(Request.Method.POST, "url", new Response.Listener<String>() {
        @Override
        public void onResponse(String response) {

        }
    }, new Response.ErrorListener() {
        @Override
        public void onErrorResponse(VolleyError error) {

        }
    }){
        @Override
        public Map<String, String> getHeaders() throws AuthFailureError {
            Map<String, String> params = new HashMap<String, String>();
            params.put("Authorization", user.getApikey());
            return params;
        }

        @Override
        protected Map<String, String> getParams() throws AuthFailureError {
            Map<String,String> params = new HashMap<>();
            params.put("list", String.valueOf(data));
            return params;
        }
    };
}

Try this one, hope it works. Earlier i was just trying to address how the php side accept the data from android.