Guest User

Untitled

a guest
Jan 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?
  2.  
  3. $template = "This is some plain text [#htmlBlock=345:leftNav] and some more text";
  4.  
  5. $htmlBlock = array("/\[#htmlBlock=(.*?):(.*?)\]/is" => $query->htmlBlock($websiteID, '$1'));
  6.  
  7. $template = preg_replace(array_keys($htmlBlock), array_values($htmlBlock), $template);
  8.  
  9. echo $template;
  10.  
  11.  
  12. // $query->htmlBlock($websiteID, '$1') should be $query->htmlBlock($websiteID, 345);
  13.  
  14. ?>
Add Comment
Please, Sign In to add comment