Hello folks !
I'm happy with PHSimple HTML DOM Parser, and really enjoy it !
But i have a little problem :
I want to change/remove some values from a file, so i use your tool this way :
$newFileContent = str_replace($element->outertext,"",$file->getContent());
In my $file->getContent(), there is the code of my file, that i got with file_get_contents() previously.
The problem is that the part of the $element in $file->getContent() does not match the one in $element->outertext
I hope you get what i mean,
Sorry for my bad english,
Have a nice day =),
Kelloy
Solved with the $stripRN variable, thought is there a better way to do that ? Cause i think it will be buggy this way, don't you think ?
The solution is that even if you spoke through the $stripRN variable. As this problem is specific, I recommend that you create a custom function file_get_html with the variable already set to false.
Last edit: hlcb 2014-05-28
To follow up on this:
$stripRN
is intended to be set tofalse
if neccessary. The parser works either way, the default option is just the same as any other DOM parser (i.e. your browser).Your solution is fine, as @hlcb correctly pointed out.
Last edit: LogMANOriginal 2018-12-06