Zheng -- ...and then sun zheng said... % % Hi, all,
Hi!
%
...
% I explode it first by "&".
% $execoutput =
% "approved=yes&error=&authnumber=025968&transactionnumber=313869";
% $execoutput_array = explode("&", $execoutput);
I don't see any problem with this.
%
% I secondly explode every parameter=value string by "="..
%
% for (@reset($execoutput_array);
% list($key,$value)[EMAIL PROTECTED]($execoutput_array);)
% {
% #output the result for debugging
% $value_array = explode("=", $value);
I don't see a particular problem with this, either, though someone might
be able to do it more efficiently.
% for (@reset($value_array); list($key1,$value1)[EMAIL PROTECTED]($value_array);)
% {
% $first = $value1;
% list($key1,$value1)[EMAIL PROTECTED]($value_array);
% $second = $value1;
I don't think you need to do this, though, because ...
%
% if($first == "approved")
% {
% $approved = $second;
% }
[snip]
... I don't think you need to go through all of these if() tests.
You have each key and value in your value_array; you should be able
to just say
$approved = $value_array['approved'] ;
and so on.
This is untested and I am in a hurry, but I hope it puts you on the right
track.
HTH & HAND
:-D
--
David T-G * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature

