Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ($paragraph->childNodes as $child) {
- $node .= $paragraph->ownerDocument->saveHTML($child);
- }
- $node = trim($node); // Does not work
- $breaks = array("rn", "n", "r");
- $node = str_replace($breaks, " ", $node); // Doesn't work
- $paragraph->ownerDocument->formatOutput = false;
- $paragraph->ownerDocument->preserveWhiteSpace = false;
- <b>Keywords: </b>marine fungus; sediment; anthranilic acid; <i>Penicillium paneum</i>; cytotoxicity
- $node = preg_replace(array('/r/', '/n/'), '', $node);
- $string = preg_replace("#<brs*/?>#i", "", $string);
- preg_replace( "/r|n/", "", $yourString);
- $node .= $paragraph->ownerDocument->saveHTML($child);
- $buffer = $paragraph->ownerDocument->saveHTML($child);
- $node .= substr($buffer, 0, strlen($buffer) - 1); // strip last byte
Add Comment
Please, Sign In to add comment