function actionCity() { $data = Yii::$app->request->get(); //实例化市 $city = new city(); $citys = $city->selectcity($data['province']); return $this->renderpartial('city', array('citys' => $citys)); }
function selectcity($province) { return $selectcity = city::find()->where("p_code='{$province}'")->asarray()->all(); }