JavaScript array to PHP array then process in PHP and return

Posted by Constructor on Stack Overflow See other posts from Stack Overflow or by Constructor
Published on 2010-04-16T16:33:36Z Indexed on 2010/04/16 16:43 UTC
Read the original article Hit count: 247

Filed under:
|
|
|

Example:

javascript:

var mycourses=new Array(); 
mycourses[0]="History";       
mycourses[1]="Math";
mycourses[1][0]="Introduction to math";
mycourses[1][1]="Math 2";
mycourses[1][2]="Math 3";

PHP will then run these values through functions (please note values are mostly not strings as in the example above but rather numbers), the functions will return some text which will than be displayed in a form

How should I go about doing this?

p.s.: I found some similar stuff, but nothing quite like this... as far as I see I will have to use JSON (is there a way to code it from JS automatically - saw this for strings) and AJAX

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about php