Hi @all!
So far, I've used phpQuery in my projects. Now I have seen Ganon, and I want to
use it for future. But I have a problem to unterstand how Ganon works.
This is what I have done in phpQuery: I want to load some HTML-Code into my
template and change some attributes.
$index = phpQuery::newDocumentHTML('HTML-Code of the entire page');
$content = phpQuery::newDocumentHTML('Some HTML-Code who has to be in index');
phpQuery::selectDocument($index);
pq('#content')->append($cont);
pq('#content a')->attr("href", "chmod")->text("Next");
die ($index);
And now I've tried to do this with Ganon:
$index = str_get_dom('HTML-Code of the entire page');
$content = str_get_dom('Some HTML-Code who has to be in index');
$index->select('#content', 0)->setInnerText($content);
And here this error comes: "Fatal error: Cannot use object of type HTML_Node as
array"
Could anybody help me with the correct code to do my actions: load some
HTML-Code into my template and change some attributes.
This would be great :)
Regards, Steff
Original issue reported on code.google.com by ezzem...@googlemail.com on 19 May 2013 at 2:54
Original issue reported on code.google.com by
ezzem...@googlemail.com
on 19 May 2013 at 2:54