title: unable to pass array from jquery to php
body: <p>I need to pass an array to from jquery to php for processing.
  i create an array object like this</p>
  
  <pre><code>function Bet(eventId,pick,odds,stake,profit,betType){
   return {
      eventId:eventId,
      pick:pick,
      odds:odds,
      stake:stake,
      profit:profit,
      betType:betType
    }
  </code></pre>
  
  <p>in my submit handler i have this piece of code</p>
  
  <pre><code>var bets = {};
  $(".bet-selection").each(function() {
    /**
    some logic here
    **/
   }
  });
  
  bets.push(Bet(eventId,pick,odds,stake,profit,betType));
  });
  
  $.ajax({
   url:    'testsubmit.php',
   cache:          false,
   type:   'post',
   data:   bets
  });
  </code></pre>
  
  <p>Nothing happens when i submit the form. I was hoping the an array will be submitted to php and i can use print_r to view the structure. Please guys what am i doing wrong and where?
  Thank you.</p>