title: Replace <body> tag with another tag
body: <p>I'm trying to use the following code to replace <code>&lt;body&gt;</code> tag from page with <code>&lt;body id="khanqah"&gt;</code></p>
  
  <pre><code>echo str_replace("%body%", "khanqah", "&lt;body id='%body%'&gt;");
  </code></pre>
  
  <p>It does adds <code>&lt;body id="khanqah"&gt;</code> to the page but the actual <code>&lt;body&gt;</code> tag still presents. I mean there are two body tags now, one <code>&lt;body&gt;</code> and the other <code>&lt;body id="khanqah"&gt;</code></p>
  
  <p>Also the <code>&lt;body id="khanqah"&gt;</code> tag is adding at the top of page, see this: <a href="http://i.imgur.com/6zYWTv8.jpg" rel="nofollow">http://i.imgur.com/6zYWTv8.jpg</a> (screenshot of page source)</p>
  
  <p>Is there any way I can work around?</p>