if (isset($_GET['var1'])) {
$var1 = $_GET['var1'];
if (isset($_GET['var2'])) {
$var2 = $_GET['var2'];
if (isset($_GET['var3'])) {
$var3 = $_GET['var3'];
// do something...
}
}
}
如果條件式再多一點的話就會更爆炸,我看到的 code 是七層... -_-
其實早在 C 語言時這個問題就有一個堪用的解法,拿到 PHP 上用也可以:
do {
if (isset($_GET['var1']))
break;
$var1 = $_GET['var1'];
// 以下類推
} while (0);
2 則留言:
> do {
> if (isset($_GET['var1']))
> ...
應該是 if (!isset($_GET['var1'])) 才對吧?
The 영앤리치 토토 operator makes provision for a broad number of promos & giveaways, irrespective of if they're a novice or frequent gamester. Players of Roulette tables can rotate the sport reels & set forth their stakes over either shade or figures. Know that it ought to be only for fun and the home always wins.
張貼留言