The getRequestVar() method is a built-in function in PHP that retrieves a value from the query string. In other words, it allows you to fetch data that has been sent over HTTP GET method.
Here are some examples:
Example 1: Retrieve the value of a parameter named “name” from the query string. In this example, if the URL was http://example.com/index.php?name=john, the result will be John.
$name = $_GET['name'];
Example 2: Retrieve multiple values from the query string. In this example, if the URL was http://example.com/index.php?name=john&age=25, the results will be John and 25.
$name = $_GET['name']; $age = $_GET['age'];
These examples are part of the core PHP library. There is no specific package or library needed to use them.
PHP Request::getVar - 30 examples found. These are the top rated real world PHP examples of Request::getVar from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples.