if($rslt = mysql_query("SELECT DISTINCT x_expert FROM products_description")) { $experts = array(); while($cr = mysql_fetch_array($rslt)) { $cr['x_expert'] = eregi_replace(", *M\.*D\.*", '_md_', $cr['x_expert']); $expertList = explode(',', strtolower($cr['x_expert'])); foreach($expertList as $expertName) { $expertName = trim($expertName); if($expertName != '') $experts[$expertName] = ''; } } ksort($experts); foreach($experts as $key => $val) { $key = ereg_replace("_md_", ', MD', $key); if(strlen($key) > 3) print(''.ucwords(ucirish($key))."
"); } } ?>