Re: VAR_DUMP INTO PHP VARIABLES
| From: | Oriole Computing | Date: | Thu, 19 Jun 2014 13:50:13 +0000 |
| Subject: | Re: VAR_DUMP INTO PHP VARIABLES | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48875@lists.php.net to get a copy of this message | ||
Hi Toby,
my response is in variable $result so i run the code as below
$responseCode = $result[return]['responsecode'];
but getting this error: PHP Parse error: syntax error, unexpected
T_RETURN, expecting ']
Warm Regards
*SUPPORT TEAMORIOLE COMPUTING*
*1938 B1 MUNGWI ROAD*
*LUSAKAZAMBIA*
*Skype:* oriolecomputing | *Url:* oriolecomputing.blogspot.com
<http://generalcomputing.blogspot.com/>
On Thu, Jun 19, 2014 at 12:23 PM, Pritoj Singh <pritojs@gmail.com> wrote:
> foreach($arr['return'] as $key=>$val){
> $$key=$val;
> }
>
>
> On Thu, Jun 19, 2014 at 3:48 PM, Toby Hart Dyke <toby@hartdyke.com> wrote:
>
> >
> > If you have the response in a variable, $response:
> >
> > $responseCode = $response[return]['responsecode'];
> > $responseMessage = $response[return]['responseMessage'];
> > $transactionID = $response[return]['transactionID'];
> >
> > This isn't really the right list to ask this question - nothing to do
> with
> > databases!
> >
> > Toby
> >
> >
> >
> > On 6/19/2014 1:40 AM, Oriole Computing wrote:
> >
> >> dear List,
> >>
> >> we have the following var_dump output from a soap response
> >>
> >> array(1) {
> >> ["return"]=>
> >> array(3) {
> >> ["responseCode"]=>
> >> string(1) "3"
> >> ["responseMessage"]=>
> >> string(39) "Duplicate RequestID, Transaction failed"
> >> ["transactionID"]=>
> >> string(21) "104454061823201453721"
> >> }
> >> }
> >>
> >>
> >> could you advise us how we can get responseCode, responseMessage and
> >> transactionID into individual php variables?
> >>
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> ___________________________
> Pritoj Singh
> Ph +91-9876270817
> Skype : pritojsinghwork
>