开发者

Access Value From Object

开发者 https://www.devze.com 2023-02-05 22:11 出处:网络
I got the following results in a object after I did a var_dump on that object, how can I access the individual elements开发者_开发知识库 and put them into a variable?

I got the following results in a object after I did a var_dump on that object, how can I access the individual elements开发者_开发知识库 and put them into a variable?

I tried:

$content["ID"];
$content->ID;

but no result :-(

  ["ID"]=>
  string(5) "31655"
  ["Reference"]=>
  string(7) "1899801"
  ["FullName"]=>
  string(18) "Lennie De Villiers"
  ["Username"]=>
  string(12) "lenniedg2000"


Try it on your end and see output

 echo $content->ID;
 $var=$content->ID;
 echo $var;

Just take a look here I created an example

http://codepad.org/KMDNCto3

0

精彩评论

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