File: phtml.actual

package info (click to toggle)
golang-github-alecthomas-chroma-v2 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,980 kB
  • sloc: xml: 33,149; python: 589; javascript: 357; makefile: 36; sh: 36
file content (19 lines) | stat: -rw-r--r-- 336 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!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>