Please excuse my ignorance - I haven't quite got a handle on objects yet. I'm trying to source the website from this array I drew out of some class code.
I performed the following;
PHP Code:
var_dump($this->items);
which resulted in this;
array(248) {
[0]=>
object(SimplePie_Item)#79 (2) {
["feed"]=>
object(PlanetPerson)#6 (47) {
["name"]=>
string(27) "Example Blog"
["feed"]=>
string(82) "http://example.com/rss.xml"
["website"]=>
string(107) "http://example.com/"
["data"]=>
array(6) {
["child"]=>.....etc
then, I set up the loop to go through the array as follows;
PHP Code:
foreach ($all_items as $item)
and now I want to try and retrieve the website address. So, if someone can help me
with the syntax for doing that it would certainly be helpful.
I've tried the following;
$item["website'];
and got the error;
Fatal error: Cannot use object of type SimplePie_Item as array in....
and also tried;
$item->website;
which returned;
Notice: Undefined property: SimplePie_Item::$website in...
|