What are the different methods to pass variables using Get in PHP?

When passing variables using GET in PHP, there are several methods to do so. One common method is to append variables to the URL using the "?" symbol followed by the variable name and value pairs separated by "&". Another method is to use an HTML form with the method attribute set to "get" to submit variables. Additionally, variables can also be passed using the $_GET superglobal array in PHP.

// Method 1: Appending variables to the URL
<a href="page.php?variable1=value1&variable2=value2">Link</a>

// Method 2: Using an HTML form
<form method="get" action="page.php">
    <input type="text" name="variable1">
    <input type="text" name="variable2">
    <input type="submit" value="Submit">
</form>

// Method 3: Using the $_GET superglobal array
$variable1 = $_GET['variable1'];
$variable2 = $_GET['variable2'];