Guest User

Untitled

a guest
Mar 13th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. foreach ($paragraph->childNodes as $child) {
  2. $node .= $paragraph->ownerDocument->saveHTML($child);
  3. }
  4.  
  5. $node = trim($node); // Does not work
  6.  
  7. $breaks = array("rn", "n", "r");
  8. $node = str_replace($breaks, " ", $node); // Doesn't work
  9.  
  10. $paragraph->ownerDocument->formatOutput = false;
  11. $paragraph->ownerDocument->preserveWhiteSpace = false;
  12.  
  13. <b>Keywords: </b>marine fungus; sediment; anthranilic acid; <i>Penicillium&#13; paneum</i>; cytotoxicity
  14.  
  15. $node = preg_replace(array('/r/', '/n/'), '', $node);
  16.  
  17. $string = preg_replace("#<brs*/?>#i", "", $string);
  18.  
  19. preg_replace( "/r|n/", "", $yourString);
  20.  
  21. $node .= $paragraph->ownerDocument->saveHTML($child);
  22.  
  23. $buffer = $paragraph->ownerDocument->saveHTML($child);
  24. $node .= substr($buffer, 0, strlen($buffer) - 1); // strip last byte
Add Comment
Please, Sign In to add comment