PDA

View Full Version : How do i put name/value pairs in a string to an array


haroldb
11-05-2002, 07:21 PM
Hi all,

I've seen the answer somewhere before, but am not able to retrieve it :-( The question is....

I have a string (the request_uri from the URL) which looks like:
a=1?b=2?x=blahblah

What I would like to convert this into an array XYZ like this
XYZ['a'] = 1
XYZ['b'] = 2
XYZ['x'] = blahblah

Thanx in advance
Harold

mordred
11-05-2002, 09:19 PM
$xyz = $_GET;

:)