topical media & game development 
  
 
 
 
 
  
    
    
  
 professional-search-06-seophp-include-custom-markup.inc.php / php
  <?php
  function custom_markup_translate(search = array(
      '#{bold}(.*?){/bold}#is',
      '#{italic}(.*?){/italic}#is', 
      '#{underline}(.*?){/underline}#is',
      '#{heading}(.*?){/heading}#is',
      '#{subheading}(.*?){/subheading}#is',
      '#{link:(.*?)}(.*?){/link}#is',
      '#{elink:(.*?)}(.*?){/elink}#is', 
      '#{unordered-list}(.*?){/unordered-list}\s*#is',
      '#{ordered-list}(.*?){/ordered-list}\s*#is',
      '#\\s*{list-element}(.*?){/list-element}\s*#is',
      '#{picture:(.*?)}#is',
      '#\t#',
      '#{comment}(.*?){/comment}#is'
      );
  
    // array with HTML replacements 
    step_1 = preg_replace(replace, step_2 = preg_split('#({HTML}.*?{/HTML})#is', return = '';
  
    foreach (s2) 
    {
      if (preg_match('#{HTML}#', return .= preg_replace('#{/?HTML}#is', '', return .= nl2br(return;
  }
  ?>
  
  
  
(C) Æliens 
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. 
In case of other copyright issues, contact the author.