title: Creating custom "html"-tags for CMS?
body: <p>I am working with a CMS for a web app in PHP, that has the needs of shortening the process for inserting (embedding) stuff, like a video from youtube or vimeo by wroting the following, which are stored in the database:</p>
  
  <pre><code>&lt;youtube id="wfI0Z6YJhL0" /&gt;
  </code></pre>
  
  <p>Which would output the following after some sort of replace:</p>
  
  <pre><code>&lt;!-- Custom formatting before object !--&gt;
  &lt;object width="640" height="385"&gt;&lt;param name="movie" value="http://www.youtube-nocookie.com/v/wfI0Z6YJhL0&amp;amp;hl=sv_SE&amp;amp;fs=1?rel=0&amp;amp;color1=0xe1600f&amp;amp;color2=0xfebd01"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube-nocookie.com/v/wfI0Z6YJhL0&amp;amp;hl=sv_SE&amp;amp;fs=1?rel=0&amp;amp;color1=0xe1600f&amp;amp;color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;
  &lt;!-- Custom formatting after object !--&gt;
  </code></pre>
  
  <p>How could I do this in PHP?</p>