[jQuery] Passing array to $.ajax()

[jQuery] Passing array to $.ajax()

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Сообщение</TITLE>
<META content="MSHTML 6.00.5730.13" name=GENERATOR></HEAD>
<BODY style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Arial" background="">
<DIV><SPAN class=248034106-11022009>I need to pass array to $.ajax() function
and get this array on the server side.</SPAN></DIV>
<DIV><SPAN class=248034106-11022009>If doing this manually, I should get:
script.php?arr[]=val1&arr[]=val2</SPAN></DIV>
<DIV><SPAN class=248034106-11022009>$.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?</SPAN></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT color=#b0b0b0><EM>Best regards,</EM></FONT></DIV>
<DIV align=left><FONT color=#b0b0b0><EM>Konstantin Mirin</EM></FONT></DIV>
<DIV align=left> </DIV>
<DIV align=left>
<DIV align=left><A
href="mailto:konstantin.mirin@gmail.com">mailto:konstantin.mirin@gmail.com</A></DIV>
<DIV align=left>
<DIV align=left><A
href="mailto:info@konstantin.takeforce.net">mailto:info@konstantin.takeforce.net</A></DIV></DIV></DIV>
<DIV> </DIV></BODY></HTML>