title: php retrieve multiple data from mysql
body: <p>I insert multiple id from my checkbox to MySQL database using php post form. In example I insert <code>id</code> (checkbox value table <code>test</code>) to mysql. Now I need a function to retrieve data from MySQL and print to my page with my example output (print horizontal list name of table <code>test</code> where data = userid)</p>
  
  <p>My checkbox value (table name is <code>test</code>):</p>
  
  <pre><code> id | name
  ----+-------
    1 | test1
    2 | test2
    3 | test3
    4 | test4
    5 | test5
    6 | test6
    7 | test7
    9 | test9
  </code></pre>
  
  <p>MySQL data insert (name of table <code>usertest</code>): </p>
  
  <pre><code> id | data    | userid
  ----+---------+--------
    1 | 1:4:6:9 | 2
    2 | 1:2:3:4 | 5
    3 | 1:2     | 7
  </code></pre>
  
  <p>Example outout :( print horizontal list name of table test where data = userid ) </p>
  
  <pre><code>user id 2 choise : test1 - test4 - test6 - test9
  </code></pre>
  
  <p>Thanks</p>