title: How can add html base URL for the particular Div section using PHP?
body: <pre><code>&lt;base href="http://www.w3schools.com/" target="_blank"&gt;
  </code></pre>
  
  <p>How can i add the above base URL for the particular div section using php like</p>
  
  <p>If i have two div section</p>
  
  <p>This section links will work with above base URl link</p>
  
  <pre><code>&lt;div&gt;
  &lt;a href="/help"&gt;help&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This section links will work with websites URl link</p>
  
  <pre><code>&lt;div&gt;
  &lt;a href="/help"&gt;help&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm trying "simple html dom" to fetch some content from some other website paste it under one div section that has relative links. That can be converted to direct link like "/images/image.png" to "www.example.com/images/image.png"</p>