title: Typeahead to show multiple values
body: <p>I have a Bootstrap tyepahead that gets live data from my database. Rather than just returning one word from the database (the person's username), I want to be able to return multiple values (an image link and some other information from the database).</p>
  
  <p>HTML and jQuery/Ajax:</p>
  
  <pre><code>&lt;input class="typeahead" type="text" data-provide="typeahead" autocomplete="off" placeholder="Type something..."&gt;
  
  &lt;script&gt;
      $('.typeahead').typeahead({
          source: function (query, process) {
              $.ajax({
                  url: 'php/script.php',
                  type: 'POST',
                  dataType: 'JSON',
                  data: 'query=' + query,
                  success: function(data) {
                      process(data);
                  }
              });
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>&lt;?php
  
      include_once("connect_info.php");
  
      $cxn = mysqli_connect($host, $user, $pass, $db) or die ("Couldn't connect to the server. Please try again.");
  
      $return = array();
  
      if(isset($_POST['query'])){
          $stmt = $cxn-&gt;prepare('SELECT user_id FROM users WHERE username LIKE concat("%", ?, "%")');
          $stmt-&gt;bind_param('s', $_POST['query']);
          $stmt-&gt;execute();
  
          while ($row = $result-&gt;fetch_assoc()) {
              $return[] = $row['user_id'];
          }
      }
  
      $json = json_encode($return);
      print_r($json);
  
  ?&gt;
  </code></pre>
  
  <p>How would this be done?</p>