Jump to content

[SOLVED] explode to variable


sniperscope

Recommended Posts

hi all,

 

Can anyone tell me how can i split a link and assign into variable.

ex. i have something like http://www.somelink.com/index.php?result=whatsoever

 

i would like to assign this link into variable. such as

$variable1 = http://www.somelink.com/index.php

$variable2 = result=whatsoever

 

here is my code and i have totally no idea how to assign them into variable. So far i can get below.

 

$check_link = $_SERVER['HTTP_REFERER'];

$divide_it = explode('?',$check_link);

foreach($divide_it as $key => $value){
echo $value ."<br>";
}

 

thanks for help

Link to comment
https://forums.phpfreaks.com/topic/140137-solved-explode-to-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.