Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $template = "This is some plain text [#htmlBlock=345:leftNav] and some more text";
- $htmlBlock = array("/\[#htmlBlock=(.*?):(.*?)\]/is" => $query->htmlBlock($websiteID, '$1'));
- $template = preg_replace(array_keys($htmlBlock), array_values($htmlBlock), $template);
- echo $template;
- // $query->htmlBlock($websiteID, '$1') should be $query->htmlBlock($websiteID, 345);
- ?>
Add Comment
Please, Sign In to add comment