PHP 根据选择改变网址的参数 PHPHTML 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果原本的地址只是http://www.aaa.com呢? 建議參數全部用數字,如果沒有參數,可以默認不出或者只出第一個$types = array('<a href="" style="color:;">家教</a>','<a href="" style="color:;">模特</a>','<a href="" style="color:;">派单</a>','<a href="" style="color:;">文员</a>');$towns = array('<a href="" style="color:;">石排</a>','<a href="" style="color:;">企石</a>','<a href="" style="color:;">横沥</a>','<a href="" style="color:;">桥头</a>','<a href="" style="color:;">谢岗</a>','a href="" style="color:;">东坑</a>','<a href="" style="color:;">常平</a>');$type = isset($_GET['type'])? intval($_GET['type']) : 0;$town = isset($_GET['town'])? intval($_GET['town']) : 0;if(isset($types[$type])){ echo $types[$type];}if(isset($towns[$town])){ echo $towns[$town];}http://www.aaa.com?type=1&town=2輸出<a href="" style="color:;">模特</a><a href="" style="color:;">横沥</a> 新手入门,高手指点! $_GET和$_POST里面要不要加引号? 关于php多重继承问题 求助:通过eclipse启动tomcat项目没问题,直接用tomcat启动的时候,项目报错(特别是有短信猫开发经验的达人请进来帮忙,急!!) 在线等待:如何缓存数据库连接呀? php 圈子程序功能 php 操作mssql的问题 免费获得一级国际域名和免费100M的asp空间 能帮我在这个正则基础上加上抓姓名的正则么,谢谢大神 php无法获取ajax传递过来的data 关于ajax问题,在线等,先谢谢各位了 PHP新手求助,如何在PHP中导入JavaScript文件?
$types = array('<a href="" style="color:;">家教</a>','<a href="" style="color:;">模特</a>','<a href="" style="color:;">派单</a>','<a href="" style="color:;">文员</a>');
$towns = array('<a href="" style="color:;">石排</a>','<a href="" style="color:;">企石</a>','<a href="" style="color:;">横沥</a>','<a href="" style="color:;">桥头</a>','<a href="" style="color:;">谢岗</a>','a href="" style="color:;">东坑</a>','<a href="" style="color:;">常平</a>');$type = isset($_GET['type'])? intval($_GET['type']) : 0;
$town = isset($_GET['town'])? intval($_GET['town']) : 0;if(isset($types[$type])){
echo $types[$type];
}if(isset($towns[$town])){
echo $towns[$town];
}
http://www.aaa.com?type=1&town=2
輸出
<a href="" style="color:;">模特</a>
<a href="" style="color:;">横沥</a>