php - Isset not working with content of object -


i have $list when print following output

aweberentry object ( [_privatedata:protected] => array     (         [0] => resource_type_link         [1] => http_etag     )  [_localdiff:protected] => array     (     )  [_collections:protected] => array     (     )  [adapter] => oauthapplication object     (         [debug] =>          [useragent] => aweber oauth consumer application 1.0 - https://labs.aweber.com/         [format] =>          [requirestokensecret] => 1         [signaturemethod] => hmac-sha1         [version] => 1.0         [curl] => curlobject object             (             )          [user] => oauthuser object             (                 [authorizedtoken] =>                  [requesttoken] =>                  [verifier] =>                  [tokensecret] => bopwmqwup6t1oajas0bjnkkn830iebnrucq9i2fl                 [accesstoken] => agjbzty67z4w1ubyp728ybsr             )          [consumerkey] => akaxl8e3tpa3urnbni4yvbyq         [consumersecret] => kvgharluqt8iy4qmj94dak9nmwonkrukhebhpa2r         [app] => aweberserviceprovider object             (                 [baseuri] => https://api.aweber.com/1.0                 [accesstokenurl] => https://auth.aweber.com/1.0/oauth/access_token                 [authorizeurl] => https://auth.aweber.com/1.0/oauth/authorize                 [requesttokenurl] => https://auth.aweber.com/1.0/oauth/request_token             )      )  [data] => array     (         [total_unconfirmed_subscribers] => 0         [total_subscribers_subscribed_yesterday] => 0         [unique_list_id] => awlist3561167         [http_etag] => "0f9b24fd3d578a7fa402bda6cf029732c2ae9dba-ca5feee2b7fbb6febfca8af5541541ea960aaedb"         [web_form_split_tests_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/web_form_split_tests         [subscribers_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/subscribers         [total_subscribers_subscribed_today] => 0         [id] => 3561167         [total_subscribed_subscribers] => 519         [total_unsubscribed_subscribers] => 22         [campaigns_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/campaigns         [custom_fields_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/custom_fields         [self_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167         [total_subscribers] => 541         [resource_type_link] => https://api.aweber.com/1.0/#list         [web_forms_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/web_forms         [name] => 7affsubniche     )  [_dynamicdata] => array     (     )  [url] => /accounts/390249/lists/3561167 ) 

now when use

echo $list->unique_list_id; 

then shows me correct output. when try

if(isset($list->unique_list_id)) {  } else {         echo 'check 1'; } 

then comes in else condition. although unique_list_id set in $list. tried property_exists not working.

so question how use isset object data.

i see unique_list_id in data property. may check them with:

if(isset($list->data['unique_list_id'])) {     // } else {     // 1 } 

Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -