I want to send that to PHP (prepared statement) using ajax. Currently, I
.load a php file many times inside of a loop, but I want to convert that into an array and send the array once, loading the PHP file once instead of 50-200 times.
array[i] = variable;
You could use
$array=json_decode($_POST['jsondata']);in your PHP script to retrieve it.