有可能得到第一個$_GET
密鑰而不指定它的名字?PHP GET動態密鑰
我想要做這樣的事情,調用這個PHP文件,如:index.php?foo=something
或index.php?bar=something
// $_GET[dynamic] stays for something to get the key.. that can be foo or bar in this example
switch($_GET[dynamic]){
case 'foo':
switch(@$_GET['foo']){
//cases depending on $_GET['foo'] value
}
break;
case 'bar':
switch(@$_GET['bar']){
//cases depending on $_GET['bar'] value
}
break;
}
GET查詢字符串 - >爆炸(「&」) - >爆炸(= ')獲得第一個項目? – Class 2013-02-10 02:45:41