hello...
i am doing authors page. in this i want to display related authors of that site. in authors table author has a field author type. he can give more types by ',' separate.
so i want to dispaly related authors who has matched his type.
here i wrote my code but displaying many times.
example:
main author type:blues,reds.
another author type reds,greens,blues.
then i am extracting and next using foreachloop like this
$select=mysql_query("select * from authors where id!=$_SESSION[author_id]");
while($fetch=mysql_fetch_array[$select])
{
foreach($mainauthortype as $mauthortype)
{
foreach($fetch[anotherauthortype] as $aauthortype)
{
if(mauthortype==aauthortype)
{
displaying related authors. here displayig same author moretimes. so how can i restrict this.
}
}
}
}