简体   繁体   English

从PHP对象提取数据

[英]Extract data from PHP Object

I'm using the Facebook API and the class produces this object. 我正在使用Facebook API,该类会产生此对象。

   object(User)#4 (5) {
      ["fbc_uid"]=>
      string(9) "324234324"
      ["fbc_first_name"]=>
      string(5) "James"
      ["fbc_last_name"]=>
      string(5) "Proud"
      ["fbc_name"]=>
      string(11) "James Proud"
      ["fbc_email"]=>
      NULL
    }

How do I extract the fbc_uid from this object, from outside the "User" Facebook class? 如何从“ User” Facebook类之外的对象中提取fbc_uid?

你有没有尝试过:

$userObj->fbc_uid

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM