Answers for "php url string get parameter"

PHP
1

get params from url php

$parts = parse_url($url);
parse_str($parts['query'], $query);
echo $query['email'];
Posted by: Guest on May-09-2021
3

Get Parameters From a URL String in PHP

phpCopy<?php 
echo $_GET['email'] . $_GET['name']
?>
Posted by: Guest on April-23-2021
0

Get Parameters From a URL String in PHP

phpCopy<?php 
$url = "https://testurl.com/test/[email protected]&name=sarah";
$components = parse_url($url);
parse_str($components['query'], $results);
echo($results['email']); 
?>
Posted by: Guest on April-23-2021

Browse Popular Code Answers by Language