jwk811 Posted May 27, 2009 Share Posted May 27, 2009 if i have a variable thats the same as a url can i get the elements from the url using GET array like i would with a regular url? Link to comment https://forums.phpfreaks.com/topic/159933-using-_get-array-with-url-sting-not-server-url/ Share on other sites More sharing options...
jwk811 Posted May 27, 2009 Author Share Posted May 27, 2009 parse_url() function? i think that will work nevermind Link to comment https://forums.phpfreaks.com/topic/159933-using-_get-array-with-url-sting-not-server-url/#findComment-843519 Share on other sites More sharing options...
jwk811 Posted May 27, 2009 Author Share Posted May 27, 2009 actually i dont think that works, if so i dunno how to use it. doesnt make sense to me Link to comment https://forums.phpfreaks.com/topic/159933-using-_get-array-with-url-sting-not-server-url/#findComment-843521 Share on other sites More sharing options...
Ken2k7 Posted May 27, 2009 Share Posted May 27, 2009 if i have a variable thats the same as a url can i get the elements from the url using GET array like i would with a regular url? Nope, but parse_url should do fine. Too bad you still have to parse the query string. <?php $str = 'www.domain.com/?q=4&b=something'; $opts = parse_url($str); echo $opts['query']; Link to comment https://forums.phpfreaks.com/topic/159933-using-_get-array-with-url-sting-not-server-url/#findComment-843619 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.