galvin Posted May 8, 2009 Share Posted May 8, 2009 What is the best (most efficient) way to change a Javascript array into a PHP array, so the array info can be processed using PHP? Do I use AJAX to send the array to a PHP file using the GET Method? Or is there some different/easier way? Quote Link to comment https://forums.phpfreaks.com/topic/157384-changing-js-array-to-php-array/ Share on other sites More sharing options...
premiso Posted May 8, 2009 Share Posted May 8, 2009 Look into the JSON functions. You can use GET or POST (preferably POST) to send the array to PHP via AJAX if you want. If my mind remembers correctly, the array in javascript should have a .toString() function and that would be what you want to pass over GET/POST. Quote Link to comment https://forums.phpfreaks.com/topic/157384-changing-js-array-to-php-array/#findComment-829640 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.