How do i display the posts by people who are in the friend list of the user in PHP?
<p>I have two tables called 'posts' and 'friends'. I want to display the 
my code-</p>

<pre><code>        $yyss = mysql_query("select * from friends where friend_id='$emaild' or user_id='$emaild'");
    $rp = mysql_num_rows($yyss);
    $fk = mysql_query("select * from friends where friend_id='$emaild' or user_id='$emaild' limit 3");
    while($nr = mysql_fetch_assoc($fk)){
    $frid=$nr['user_id'];
    $ffr = $nr['friend_id'];
    $sql = mysql_query("SELECT * FROM posts where id='$frid' or id='$ffr' order by unid desc");
}
</code></pre>

<p>How do I display the posts that are posted by the user's friend without displaying them again and again?</p>
