Skip to main content

Find and Replace with QueryPath in PHP

·22 words·1 min
Mike Bell
Author
Mike Bell

To find and replace using querypath without destroying existing context you can use the following:

$temp = qp($output, 'table')->addclass('table');
$output = $temp->top('body')->innerHTML();