title: write a php to output the query result of friends who's friends with user id is 2
body: <p>I have two column table friends table where it has a recode of users whos friends with eacho other. i want to get a list who's friends with a specific user. to do that i wrote a sql query as such and got a result..</p>
  
  <pre><code>SELECT * 
  FROM  `friends` 
  WHERE  `user_idf` =  '2'
  OR  `user_idff` =  '2'
  
  ++ user_idf ++++   user_idff+++
      2   +   1
      3   +   2   
      4   +   2
      2   +   5
  +++++++++++++++++++++++++++
  </code></pre>
  
  <p>how to write a php function to echo user who's a friend of 2 (this i will replace with a POST where it gets user id from an application)
  i.e.
  1, 3, 4, 5</p>