while ($data = mysql_fetch_assoc($city) ) { if($data['city'] == 'Rancho Cordova') { echo 'We are rancho style'; } echo ', $data['city'], ''; }