From: Stefan <son...@ba...> - 2006-07-19 14:46:12
|
i need to change some lines of code from a wiki page during runtime with a plugin with $page = $dbi->getPage($pagename); $current = $page->getCurrentRevision(); $content = $current->getContent(); i do get the content of the page now i like to read every line from the $content und if something matches i will chnage the line and write it back to be viewed then. For example I do have a special sign on the page like ## i will replace it with other code. foreach ($content as $line) { If (substr($line,0,2) == "##") { $line = $newtext . substr($line,2) } } How to write the new $line instead the original $line Stefan |