0

I want to copy Homepage URL After =

I am using this code

echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

But it is copying the Whole URL i.e., https://example.com/?link=$1

I want just Value of $1

ndm
  • 59,784
  • 9
  • 71
  • 110

2 Answers2

0

To echo out the value after the '=' you'll need to use $_GET['']. So in your example:

echo $_GET['link'];
JJuless
  • 149
  • 1
  • 13
0

There are many ways, but you can use it

$url = "https://mail.google.com/mail/u/0/?tab=wm&ogbl";
$array_url = explode("=",$url);
echo $array_url[1];

output : https://paiza.io/projects/9HEmUcCM3UZqYEm3OhQe_Q