Jump to content

using $_GET array with url sting not server url?


jwk811

Recommended Posts

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'];

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.