Can you submit your request via POST? If so, try using: serializeArray(): http://docs.jquery.com/Ajax/serializeArray and inserting the result as the data part of your AJAX request.
else, see if serialize(): http://docs.jquery.com/Ajax/serialize can do the work for you. On Feb 10, 8:43 pm, "Konstantin Mirin" <konstantin.mi...@gmail.com> wrote: > I need to pass array to $.ajax() function and get this array on the server > side. > If doing this manually, I should get: script.php?arr[]=val1&arr[]=val2 > $.ajax() only encodes like script.php?arr=val1&arr=val2 and I get only the > last value on the server side... any ideas how to do it without custom > function? > > Best regards, > Konstantin Mirin > > mailto:konstantin.mi...@gmail.com > mailto:i...@konstantin.takeforce.net