19 lines
336 B
Text
19 lines
336 B
Text
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
|
|
<h1>My first PHP page</h1>
|
|
<?php
|
|
|
|
$docs = $modx->getIterator('modResource', ["parent" => 84]);
|
|
|
|
foreach($docs as $doc){
|
|
$q=$doc->content;
|
|
$doc->set("content", preg_replace("/Some value/i", "Replacement", $q));
|
|
print_r($doc->content);
|
|
// $doc->save();
|
|
}
|
|
// some comment
|
|
?>
|
|
</body>
|
|
</html>
|