title: I am trying to remove selected values from the menu list in jquery UI autocomplete
body: <p>This is my auto complete code. What should my PHP code look like in order 
  to receive the array that I put in the $.post() function? </p>
  
  <pre><code>var excludeArray = [];
  
  $(".fb25").autocomplete({
  
      source: 'vacation_get25Football.php',
  
      focus: function(event, ui) {
          $(this).val(ui.item.label);
          return false;
      },
  
      select: function(event, ui) {
  
          var exclude;
  
          $(this).val(ui.item.label);
          exclude = $(this).next().val(ui.item.value).val();
          excludeArray.push(exclude);
  
         //  SENDING Exluded values to URL
  
          $.post('vacation_get25Football.php', {'array[]': excludeArray});
  
       //  alert looks like (for example) 1,4,5
  
          alert(excludeArray);
          return false;
      }
  });
  </code></pre>
  
  <p>This is  part of vacation_get25Football.php . My idea would be to insert certain values like, '1,3' into the IN() statement in sql. Doing this will subtract whatever values that are in IN() from the query. But For some reason I cannot get the array that I posted in Jquery to come up in PHP. From what I can tell, it's acting like  $_POST['array']) isn't even being posted. Can any of you see what's wrong? Thank you.</p>
  
  <pre><code>if (($term = $_GET['term'])) {
  
  if(($excludeArr = $_POST['array'])){
   $test = 2;
  }else{
      /////////THIS IS THE ANSWER NO MATTER WHAT. 
      $test =1;
  }
  
  $objDB = mysqlDB();
  
  $select_query = "SELECT team, ftball_id FROM tbl_football_top25 
  WHERE team 
  LIKE '%$term%'
  AND NOT 
  ftball_id IN( $test )
  ;";
  $prop_info = $objDB-&gt;getRecords($select_query);
  
  $data = array();
  
  if ($prop_info != "No records") {
  
      FOREACH ($prop_info as $thisprop) {
  
          array_push($data, array('label' =&gt; $thisprop['team'], 'value' =&gt;         $thisprop['ftball_id']));
      }
      echo(json_encode($data));
  }
  
  //close db
  $objDB-&gt;close();
  }
  </code></pre>