By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Getting values from a query string

P: 6
Hi there,

I've used the cUrl library to return a query string from a remote server to a variable. The

query string looks a bit like this:


At the moment, the whole of this query string is contained in a single variable ($qstring) so if I print $qstring, "message_id=a1&recipient=unit1&sendday=fri" will be sent to the browser.

Can anyone tell me how to break the values "a1", "unit1" and "fri" into individual variables

so that I can start using them in the rest of my code like this:

$message_id = "a1";
$recipient = "unit1";
$sendday = "fri";

I'd like to achive this in the same php script rather than sending it to another page to GET

the elements of the query string.

Thanks in advance,
May 18 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 5,821
Methinks you'll be liking parse_str.
May 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.