i have Two String ArrayList in JAVA(Question,Answer).I have to put these two array list with in one JSONobject or JSONArraylist and need to Send as a json object or arraylist to php.There i have to Iterate two array lists one by one.
i want to get json object or arraylist like
$array1=array(2, 4);\\First Requested array
$array2=array(5, 96);\\Second Requested array
$array = array(
'r1' =>$array1 ,
'r2' => $array2,
);
I don't know how to put two arrays with in a arraylist or object..
my ArrayList is
ArrayList<String> Questions = new ArrayList<String>();
ArrayList<String> Answers = new ArrayList<String>();
I don't know how to put two arrays in one arraylist and how to send,receive json object .
Thanks in Advance...