FluentDOM\Query prepend(string|array|\DOMNode|\Traversable $selector);
Prepend content to the inside of every matched element.
$html = <<<HTML <html> <head> <title>Examples: FluentDOM\Query::prepend()</title> </head> <body> <p> he said. </p> </body> </html> HTML; echo FluentDOM($html) ->find('//p') ->prepend('<strong>Hello</strong>');
<?xml version="1.0"?> <html> <head> <title>Examples: FluentDOM\Query::prepend()</title> </head> <body> <p><strong>Hello</strong> he said. </p> </body> </html>
There was an error while loading. Please reload this page.