I am confused,
I did a print_r (4data) and it returned the following:
stdClass Object ( [date_info] => stdClass Object ( [tables] => Array ( [where] => Array ( [fields] => Array ( [feeds_node_item_url] => Array ( [field] => url [table] => feeds_node_item [alias] => feeds_node_item_url )
How do I obtain the the url? How do I obtain the value from an Object? Is the url a VALUE or is it a KEY?
All I can think is that if I am in *tables *I can get the value myurl = tables['where']['fields']['feeds_node_item']['field']=>url; print myurl;
Any ideas?
Thanks,
Néstor
I fixed the code up a little bit. I was missing some parenthesis and I put a 4data instead of $data :-) On Tue, Nov 15, 2011 at 3:06 PM, Néstor rotsen@gmail.com wrote:
I am confused,
I did a print_r ($data) and it returned the following:
stdClass Object ( [date_info] => stdClass Object ( [tables] => Array ( [where] => Array ( [fields] => Array ( [feeds_node_item_url] => Array ( [field] => url [table] => feeds_node_item [alias] => feeds_node_item_url ))))))
How do I obtain the the url? How do I obtain the value from an Object? Is the url a VALUE or is it a KEY?
All I can think is that if I am in *tables *I can get the value myurl = tables['where']['fields']['feeds_node_item']['field']->url; print myurl;
Any ideas?
Thanks,
Néstor
Hey Néstor,
to get the url you do:
$data->data_info->tables['where']['fields']['feed_node_item_url']['field']
the difference between -> and [] is
use -> when its a Object use [] when its a array
that answers your question?
Op 16-11-2011 0:23, Néstor schreef:
I fixed the code up a little bit. I was missing some parenthesis and I put a 4data instead of $data :-) On Tue, Nov 15, 2011 at 3:06 PM, Néstor <rotsen@gmail.com mailto:rotsen@gmail.com> wrote:
I am confused, I did a print_r ($data) and it returned the following: stdClass Object ( [date_info] => stdClass Object ( [tables] => Array ( [where] => Array ( [fields] => Array ( [feeds_node_item_url] => Array ( [field] => url [table] => feeds_node_item [alias] => feeds_node_item_url )))))) How do I obtain the the url? How do I obtain the value from an Object? Is the url a VALUE or is it a KEY? All I can think is that if I am in *tables *I can get the value myurl = tables['where']['fields']['feeds_node_item']['field']->url; print myurl; Any ideas? Thanks, Néstor