时间:2021-07-01 10:21:17 帮助过:25人阅读
strpos
header ( 'Content-Type:text/html;charset=utf-8' );$SA_IP = '北京市';$citys = '北京市,天津市,上海市,深圳市';if (strpos ( $citys, $SA_IP ) !== false) { echo '存在';} else { echo '不存在';}
strpos楼上正解
header ( 'Content-Type:text/html;charset=utf-8' );$SA_IP = '北京市';$citys = '北京市,天津市,上海市,深圳市';if (strpos ( $citys, $SA_IP ) !== false) { echo '存在';} else { echo '不存在';}
header ( 'Content-Type:text/html;charset=utf-8' );$SA_IP = '北京市';$citys = '北京市,天津市,上海市,深圳市';if (strpos ( $citys, $SA_IP ) !== false) { echo '存在';} else { echo '不存在';}