php检查URL中是否包含变量

Car*_*ios 2 php url

我正在尝试使用php在我的URL中搜索变量值.这是我的网址示例:http:
//example.com/ford/?album = all&gallery = 1

我想要构建的脚本来检查gallery我的URL中找到的变量.

san*_*lto 13

这可能有所帮助:

isset($_GET['gallery'])

<?php

if(isset($_GET['gallery'])){
   echo "The variable exists!";
}else{
   echo "The variable DOES NOT exist!";
}

?>
Run Code Online (Sandbox Code Playgroud)

isset功能