if ile koşul belirterek yapılamaz mı?
if($sehir == "istanbul") {

// burada istanbulun ilçelerini listeyelen fonksiyon olabilir

}