dwest100 Posted February 15, 2018 Share Posted February 15, 2018 I have the following object returned as a response to an external service request: QuickEmailVerification\HttpClient\Response Object ( [body] => Array ( [result] => invalid [reason] => rejected_email [disposable] => false [accept_all] => false [role] => false [free] => false => *********** [user] => ****** [domain] => ******* [safe_to_send] => false [did_you_mean] => [success] => true [message] => ) => 200 [headers] => Array ( [server] => Array ( .....etc. etc. /I can access the [body] node by using var_dump($request->body); And the Array will display on the browser screen as expected.But how do I var_dump any specific value in the Array? Thanks for all assistance! Quote Link to comment Share on other sites More sharing options...
kicken Posted February 15, 2018 Share Posted February 15, 2018 The same way you'd access any array, by specifying the key you want in brackets. The array being part of an object doesn't change anything here. var_dump($request->body['success']); 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.