0){...}" statement to determine whether the parameter passed by get exists. Can."/> 0){...}" statement to determine whether the parameter passed by get exists. Can.">
Home >Backend Development >PHP Problem >How to determine whether get storage exists in php
php method to determine whether get exists: first create a PHP sample file; then determine get through the "if(is_array($_GET)&&count($_GET)>0){...}" statement Just check whether the parameter passed by value exists.
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
How does php determine whether the get store exists?
php Determine whether the parameter passed by get value exists
if(is_array($_GET)&&count($_GET)>0)//先判断是否通过get传值了 { if(isset($_GET["id"]))//是否存在"id"的参数 { $id=$_GET["id"];//存在 } }
In PHP, the predefined $_GET variable is used to collect values from the form with method="get" .
$_GET Variable
The predefined $_GET variable is used to collect values from the form with method="get".
The information sent from a form with the GET method is visible to anyone (will be displayed in the browser's address bar), and there is a limit on the amount of information sent.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to determine whether get storage exists in php. For more information, please follow other related articles on the PHP Chinese website!