urldecode it first. Then explode it.
Cal
http://www.calevans.com
-----Original Message-----
From: Shawn Pritchard [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 10:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How do I get Variables out of a string?
Hello!
I have been bashing my head trying to figure this out, and I'm hoping
somebody can show me the correct way to do this:
A PGP signed set of variables is passed to our URL via GET.
I use HTTP_GET_VARS to grab the PGP string, which is contained in a variable
called "trnResponse".
I run that through pgpv to end up with the raw string, which I store in a
variable called $rawstring
The string looks like:
trnId=10000019&messageId=1&messageText=Approved&authCode=&trnDate=3%2F16%2F2
001+8%3A07%3A14+AM&trnOrderNumber=435643
That's where I get confused about the best way to pull the variables out of
the string.
I was using something like: $thearray = explode ("&",
rawurldecode($rawstring)); (this still leaves me with "+" in some places,
but I can use str_replace to get rid of them)
I was exploding on "&", but that leaves me with an array with things like
trnId=10000019 in each "cell" It does explode properly, but now, how do I
pull these things out of the array and get them defined as variables??
Or...do I even need to put them into the array in the first place?
THANK YOU for any help someone might be able to provide!!
--
Shawn Pritchard
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]