1phpCopy<?php
2$url = "https://testurl.com/test/1234?email=abc@test.com&name=sarah";
3$components = parse_url($url);
4parse_str($components['query'], $results);
5print_r($results);
6?>
7
1phpCopy<?php
2$url = "https://testurl.com/test/1234?email=abc@test.com&name=sarah";
3$components = parse_url($url);
4parse_str($components['query'], $results);
5echo($results['email']);
6?>
7
1phpCopy<?php
2$url = "https://testurl.com/test/1234?email=abc@test.com&name=sarah";
3$components = parse_url($url, PHP_URL_QUERY);
4//$component parameter is PHP_URL_QUERY
5parse_str($components, $results);
6print_r($results);
7?>
8