title: how to show email suggestions from database with magicSuggest PHP
body: <p>I have a problem with the magicSuggest plugin. I trie to display all email addresses from my database with magicSuggest, but the output-list become empty. </p>
  
  <p>from create_event.php</p>
  
  <pre><code>   &lt;script&gt;
  
     $('#ms-allowFreeEntries').magicSuggest({
        placeholder : "Select" , 
        data : "email.php" 
      });
  
  
     &lt;/script&gt;
  </code></pre>
  
  <p>from email.php</p>
  
  <pre><code>&lt;?php
  include('includes/config.php');
  include('includes/db.php');
  include('includes/functions.php');
    $result = $db-&gt;query("select `email` from `users");
  
    $rows = array();
    while($row = $result-&gt;fetch_array(MYSQL_ASSOC)) {
      $rows[] = array_map("utf8_encode", $row);
    }
  
    echo json_encode($rows);
    $result-&gt;close();
    $db-&gt;close();
  
    ?&gt;
  </code></pre>
  
  <p>picture from 
  <a href="https://i.stack.imgur.com/YWXm5.png" rel="nofollow">output</a></p>