title: Multiple labels with Jquery autocomplete
body: <p>I am trying to implement Autocomplete on my project with Jquery UI, however I would like to have a small modification. </p>
  
  <p>the PHP that is called dynamically is :</p>
  
  <pre><code>&lt;?php 
  include "../../connections/connect.inc.php";
  
  
  $return_arr = array();
  
  
  $search_term = "%".$_GET['term']."%";
  $moviesquery = "SELECT * FROM movie where movie_name like :term";
  $movieresults = $dbconnection-&gt;prepare($artistsquery);
  $movieresults-&gt;bindValue(":term",$search_term);
  $movieresults-&gt;execute();
  
  /* Retrieve and store in array the results of the query.*/
  while ($row = $movieresults-&gt;fetch(PDO::FETCH_ASSOC)) {
  
  $return_arr[] = array('label'=&gt;$row['movie_name'],'value'=&gt;$row['movie_name']); //build an array
  //array_push($return_arr,$row_array);
  }
  
  /* Toss back results as json encoded array. */
  echo json_encode($return_arr);
  </code></pre>
  
  <p>This is what I have written in my JQuery call :</p>
  
  <pre><code>$(function() {
      $("#movie_name").autocomplete({
         source: "sendmovies.php",
         minLength: 3
      })
  });
  </code></pre>
  
  <p>The problem is, I want to see more information on each movie in the autocomplete suggestions. Currently the autocomplete works and shows only the movie name. I want it to display the country below the name, and the release year. when the user clicks on it, I want the autocomplete to take only the value of the movie name. And possibly, get the movie ID into a hidden field as well. I am a Jquery noobie so if anyone could help me I would be very glad.</p>
  
  <p>Thank you all.</p>