mirror of
https://github.com/alecthomas/chroma.git
synced 2025-02-13 13:28:27 +02:00
The former is pure PHP code while the latter is PHP code in <? ?> tags, within HTML. Fixes #210.
20 lines
336 B
Plaintext
20 lines
336 B
Plaintext
<!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>
|