title: How to create [youtube]-Tag for PECL bbcode extension?
body: <p>I use the <a href="http://us3.php.net/manual/en/book.bbcode.php" rel="nofollow noreferrer">PECL bbcode extension</a> for parsing BBCode-Tags.</p>
  
  <p>Can anybody show me a way of <em>replacing</em> the text between the BBCode tags instead of <em>surrounding</em> it with HTML tags? I want to build a <code>[youtube]</code> Tag:</p>
  
  <pre><code>[youtube]w0ffwDYo00Q[/youtube]
  </code></pre>
  
  <p>My configuration for this tag looks like this:</p>
  
  <pre><code>$tags = array(
      'youtube' =&gt; array(
          'type'     =&gt; BBCODE_TYPE_NOARG,
          'open_tag' =&gt; 
              '&lt;object width="425" height="350"&gt;
                   &lt;param name="movie" value="http://www.youtube.com/v/{CONTENT}"&gt;&lt;/param&gt;
                   &lt;embed src="http://www.youtube.com/v/{CONTENT}" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;
               &lt;/object&gt;',
          'close_tag' =&gt; '',
      ),
  );
  </code></pre>
  
  <p>The Problem: the text between the <code>[youtube]</code> tags (Youtube ID) is needed twice (for object and embed tags) so I cannot use the <code>close_tag</code> as intended. </p>
  
  <p>Result: the markup for inclusion of Youtube player is created correctly but after that the Youtube-ID is printed:</p>
  
  <pre><code>&lt;object width="425" height="350"&gt;
      &lt;param name="movie" value="http://www.youtube.com/v/w0ffwDYo00Q"&gt;&lt;/param&gt;
      &lt;embed src="http://www.youtube.com/v/w0ffwDYo00Q" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;
  &lt;/object&gt;w0ffwDYo00Q
  </code></pre>
  
  <p>Anybody knows how to fix this?</p>
  
  <p>Thanks in advance!</p>