Automatically change font if a duplicate occurs in a column

I am building a statistics database and website. The data displays as follows on the website:
TIME Name
11.48 Tsholofelo Thipe
11.56 Tsholofelo Thipe
11.58 Cherese Jones

I am trying to get php to display the second, third etc occurrence of the same name in a diffrent formatting e.g. italic, or the first occurrence in bold.

So that it displays as follows:
11.48 Tsholofelo Thipe
11.56 Tsholofelo Thipe
11.58 Cherese Jones

My code currently looks like this:

[php]$data = mysql_query(“SELECT * FROM Results2012 WHERE Event=‘100 Metres’ AND Wind<‘1.9’ AND Wind<>‘nwi’ AND Sex=‘Women’ ORDER BY Results2012.Perf ASC LIMIT 10”)
or die(mysql_error());

$query=“SELECT * FROM tablename”; $result=mysql_query($query);

Print “

”;
while($info = mysql_fetch_array( $data ))
{

Print “

”;
Print “ ";
Print “ ";
Print “ ";
Print “ ";
Print “ ";
Print “ ";
Print “ ";
Print “ ";
Print “ ";
}
Print “
”.$info[‘Perf’] . "”.$info[‘Wind’] . "”.$info[‘Name’] . "”.$info[‘Prov’] . "”.$info[‘DOB’] . "”.$info[‘Age’] . "”.$info[‘Race’] . "”.$info[‘Venue’] . "”.$info[‘Date’] . "
”;[/php]

Try array_count_values($array);

Sponsor our Newsletter | Privacy Policy | Terms of Service