I have a variable, $result, that hold the following:
object(stdClass) #1 (1) { ["response"]= > object(stdClass) #2 (6) {
["status"]= > string(2) "OK"
["count"] => int(1)
["flash_click_variable"] => NULL
["no_iframes"] => bool(false)
["content1"] => string(765)
"document.write('\r\n\r\n');"
["content2"] => string(711)
"<strong>hello world</strong>
" ["
file_name "]=> NULL ["
track_clicks "]=> bool(true) ["
audit_status "]=> string(7) "
audited " ["
macros "]=> string(12) "
ADV_ID, CP_ID " ["
profile_id "]=> NULL ["
audit_feedback "]=> string(0) "
"
If I var_dump the variable, "hello world" is rendered (because of document.write) in bold...among other elements in the array.
I want to only var dump content1 in the array.
I know I should be using ->
but how do I do this when there are multiple object(stdClass).
I only want the 1st record in the array.
I tried echo $result[0]->response[count];
just to see if I could pull out the count value but it wasn't giving anything before trying to echo content1. How do I do this?