Dentists that participate in Smiles For Life are members of the Crown Council, an alliance of leading-edge dental teams that are passionately committed to promoting oral health, fighting oral cancer and serving their communities through charitable work. From March through June each year, hundreds of dental practices throughout the U.S. and Canada participate in the Smiles For Life campaign by professionally whitening teeth and donating 100% of the proceeds from each teeth whitening appointment to help seriously ill, disabled, and underprivileged children in their local communities and around the world.
‘;
echo ‘
Below is a list of current Smiles For Life participating dentists sorted alphabetically by last name.
‘;
echo ‘
Smiles For Life Participating Dentists
‘;
//Set up links to each letter
echo ‘
Click on a letter to jump to that section of the list: ‘;
for ($i = ord(‘A’); $i <= ord('Z'); $i++) {
echo '‘.chr($i).’ ‘;
}
echo ‘
‘;
$num = 0;
$letter = “”;
$select = “SELECT
m.designate,
m.mbr_id,
m.first_nm,
m.last_nm,
m.full_nm,
m.addr1,
m.addr2,
m.city,
m.state,
m.zip,
m.office_ph,
m.country”;
$from = ” FROM members m”;
$where = ” WHERE no_public_display = ‘no’
AND active_smiles_for_life = ‘yes’
“;
$orderby = ” ORDER BY m.last_nm, m.first_nm”;
$limit = “”;
$query = $select . $from . $where . $orderby . $limit;
//echo $query.’
‘;
$result = runCCSQL($query);
if (mysql_num_rows($result) == 0) {
echo ‘
Unfortunately, no Smiles For Life dentists participating dentists currently match your search criteria. Please return to the search form to adjust your search criteria or call the Smiles For Life office at (800) 276-9658.
‘;
}
else {
while ($dentist = mysql_fetch_array($result)){
if ($num == 1) {
$gray = ‘ list_gray’;
$num = 0;
} else {
$gray = ”;
$num = 1;
}
if ($dentist[‘last_nm’] == “”) {
echo ”; //Start a table for those where the practice is the member, no first and last names.
}
if (strtoupper(substr($dentist[‘last_nm’],0,1)) <> $letter) {
$prev_letter = $letter;
$letter = strtoupper(substr($dentist[‘last_nm’],0,1));
if ($prev_letter == “”) {
echo ‘
‘;
$prev_letter = “A”;
}
else {
echo ”;
echo ‘
‘;
}
//Now show any empty letters in between
for ($i = ord($prev_letter) + 1; $i <= ord($letter); $i++) {
echo '
‘;
}
echo ”;
}
echo ‘
echo ‘
‘;
if ($dentist[‘addr1’] || $dentist[‘city’] || $dentist[‘state’] || $dentist[‘zip’]) {
echo ‘
if ($dentist[‘addr2’])
echo ‘ ‘.trim($dentist[‘addr2’]);
echo ‘, ‘.trim($dentist[‘city’]).’, ‘.trim($dentist[‘state’]).’ ‘.$dentist[‘zip’].’
‘;
}
else {
echo ‘
‘;
}
if ($dentist[‘office_ph’]) {
echo ‘
‘;
}
else {
echo ‘
‘;
}
if ($dentist[‘country’] == ‘US’ || $dentist[‘country’] == “”) {
$country = “United States”;
}
else if (strlen($dentist[‘country’]) > 3) {
$country = ucwords(strtolower($dentist[‘country’]));
}
else {
$country = strtoupper($dentist[‘country’]);
}
echo ‘
‘;
echo ‘
‘;
if ($dentist[‘last_nm’] == “”) {
echo ”; //End a table for those where the practice is the member, no first and last names.
}
}
//Done with doctors. Now close the current table and then show letters to “Z”
echo ”;
//Now show any empty letters in between
for ($i = ord($letter) + 1; $i <= ord('Z'); $i++) {
echo '
‘;
}
}
?>