$vars['dedicatedip'] ='192.146.12.1'; $vars['assignedips'] = '192.168.12.1 192.134.12.1'; //ip与ip之间有换行符隔开 $arr3 = ''; if(!empty($vars['dedicatedip'])){ $arr =array($vars['dedicatedip']); } if(!empty($vars['assignedips'])){ $arr2 = explode(PHP_EOL,$vars['assignedips']); } if(!empty($arr) && !empty($arr2)){ $arr3 = array_merge($arr,$arr2); }elseif(!empty($arr2)){ $arr3 = $arr2; }elseif(!empty($arr1)){ $arr3 = $arr1; }
添加回答
举报
0/150
提交
取消