Keyur Keyur - 1 year ago 240
PHP Question

phpQuery - how to get plain HTML

I'm using this plugin, for editing the HTML content.

This is my code,

//$formdata contains plain HTML
$doc = phpQuery::newDocument($formData);
//Some Editing
$editedData = phpQuery::getDocument($doc->getDocumentID());
//This returns object

This returns an object. Is there any way to get plain HTML?

Answer Source

You can cast the phpQueryObject object to a string:

$markup = (string) $editedData;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download