Okay, I've posted on forums to no avail and now I am turning on the
gEeK signal on from Livejournal Land. I am currently trying to create
a site search using the google search engine, the only drawback is
I cannot use JavaScript because as a Government Department we need to
provide JavaScript Alternitves.
So looking at the new Ajax Google search its provide an alternitive
using JSON, which so far returns information fine with JavaScript
being turned off. I am using the php Services_JSON.php with php
5.1.2 with wamp and the php_json.dll. I can return the dataset
and decode it with json and even see the info if i do a var_dump.
What I am having problems with is parsing the information, so I
can write it out as a custom style page. I can't get the data out.
I am currently trying to put the object into an array and call it
out that way. It keep returning an error when I try to access it
directly as an array i assume from the error its a object not an
array or some reading of the web says it might be coming through as
an associated array? the error message for trying access the $output;
as an array is below:
Fatal error: Cannot use object of type stdClass as array in C:\wamp\www\GoogleSearch.php on line 18
( teh code )
gEeK signal on from Livejournal Land. I am currently trying to create
a site search using the google search engine, the only drawback is
I cannot use JavaScript because as a Government Department we need to
provide JavaScript Alternitves.
So looking at the new Ajax Google search its provide an alternitive
using JSON, which so far returns information fine with JavaScript
being turned off. I am using the php Services_JSON.php with php
5.1.2 with wamp and the php_json.dll. I can return the dataset
and decode it with json and even see the info if i do a var_dump.
What I am having problems with is parsing the information, so I
can write it out as a custom style page. I can't get the data out.
I am currently trying to put the object into an array and call it
out that way. It keep returning an error when I try to access it
directly as an array i assume from the error its a object not an
array or some reading of the web says it might be coming through as
an associated array? the error message for trying access the $output;
as an array is below:
Fatal error: Cannot use object of type stdClass as array in C:\wamp\www\GoogleSearch.php on line 18
( teh code )