code_junkie

DOM manipulation in PHP

Nov 10th, 2011
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. <div>This is some <b>text
  2.  
  3. $d = new DOMDocument;
  4. $d->loadHTML('<div>This is some <b>text');
  5. $d->saveHTML();
  6.  
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
  8. <html>
  9. <body>
  10. <div>This is some <b>text</b></div>
  11. </body>
  12. </html>
Add Comment
Please, Sign In to add comment