$page2_url = "page2.php?name=John";
$name = $_GET['name']; echo "Hello, $name!";
$product_url = "products.php?sort=price";
$sort = $_GET['sort']; switch ($sort) { case 'price': // sort by price break; case 'name': // sort by name break; case 'popularity': // sort by popularity break; default: // no sorting specified break; }
$search_url = "search.php?color=blue&price_range=100-200&brand=nike";
$color = $_GET['color']; $price_range = $_GET['price_range']; $brand = $_GET['brand']; // filter by color if (!empty($color)) { // filter by color } // filter by price range if (!empty($price_range)) { // filter by price } // filter by brand if (!empty($brand)) { // filter by brand }The PHP built-in function for URL manipulation is called "parse_url()". There are also third-party libraries like "phpQuery" and "Guzzle" that provide additional URL manipulation functions.