开发者

PHP: Getting data out of an object

How can I get the user_nicename from this object?

BP_User Object
(
    [data] => stdClass Object
        (
            [ID] => 1
            [user_login] => NICENICE
            [user_pass] => $P$BwLHvV7zxcZZ/zW7MY0NXNSmANP.U5.
            [user_nicename] => NICENAME
            ...

And where can 开发者_StackOverflowI find resources to learn this?


$variable->data->user_nicename

should work.


You can print by another way also

foreach($result->data as $newdata) //$result is variable that store raw data 
{
printf("name: %s, Pass: %s, nicename: %s <br/>", $newdata->user_login, $newdata->user_pass, $newdata->user_nicename);
}

Result will be

name:NICENICE , Pass:$P$BwLHvV7zxcZZ/zW7MY0NXNSmANP.U5., nicename:NICENAME
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜