$_GET in PHP

The $_GET superglobal is used to collect data sent in the URL query string. It is visible in the URL and is typically used for retrieving data.

Example of Using $_GET

<?php
// Assuming a URL like 'example.php?name=John'
echo "Name: " . $_GET['name'] . "\n";
?>

Output:

Name: John

Explanation: This example demonstrates how to retrieve data from the URL using the $_GET superglobal.