Keyur Keyur - 6 months ago 51
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?


You can cast the phpQueryObject object to a string:

$markup = (string) $editedData;