title: How to replace all ul and li tag with div using PHP Simple HTML DOM Parser?
body: <p>Ok, I want to create a "website mobilizer" by using PHP Simple HTML DOM Parser. In the present phase, I want to- </p>
  
  <ol>
  <li>change all 'ul' and 'li' tag to 'div' tag and </li>
  <li>change all 'table' elements (e.g. table,tr,td,th) to div. I tried an workaround for the first problem in following way:</li>
  </ol>
  
  <p>. </p>
  
  <pre><code>$html=new new simple_html_dom();
  $html&gt;load_file($sourceurl);
  
  $div="div";
  foreach ($html-&gt;find('ul') as $element) {  
   $element=$div;
   }
  </code></pre>
  
  <p>It does seem dull, but I'm not being able to find any other solution. I am discouraged for using <code>preg_match</code>, though I don't know if it can give me the desired output. Any help will be appreciated.</p>