这是代码
function salert_get_name() {
$rand_name = $this->salert_settings['popup-names'];
$text_array = explode(',',$rand_name);
$name = array_rand($text_array,1);
return $text_array[$name];
}
function salert_get_country(){
$rand_country = $this->salert_settings['popup-countries'];
$country_array = explode(',',$rand_country);
$country = array_rand($country_array,1);
return $country_array[$country];
}
那是我希望数组中的名字和第一个国家匹配