this is Post-JavaScript-Array-to-PHP-Array.html. We use JSarray.toString() on our JSarray and document.myform.secret.value = JSarray.toString() in a JavaScript script and a hidden form field with the name "secret" and the "convert JavaScript array to PHP array" button is a form submit button, so all we have done is stringify the array and POST it to our Post-JavaScript-Array-to-PHP-Array.php page via our HTML form. Easy peasy!

<script language="JavaScript">

JSarray = new Array();
JSarray[0] = "you";
JSarray[1] = "sure";
JSarray[2] = "do";
JSarray[3] = "stink";

function send_value(){document.myform.secret.value = JSarray.toString();}


<form action="Post-JavaScript-Array-to-PHP-Array.php" method='post' name='myform' onSubmit='send_value()'>
<input name='secret' type='hidden' value=''>
<input type='submit' value='convert JavaScript array to PHP array'>