I am just starting with Simple PHP HTML DOM PARSER so, what is the way to replace text only of any fetched content. Suppose i have fetched some content from a website with full HTML codes, but while applying PHP code like $html = str_replace(".", "DOT", $html);
it cause a error. Because in this case it replace all .
with DOT
so that all links are broken, but what i want is just to replace .
to DOT
in texts but all code should be untouched.
Assuming, The fetched data is something like this<a href="http://example.com">Example.com</a>
The Output should be like this<a href="http://example.com">ExampleDOTcom</a>
how to do like this? I'm a beginner so please describe more ... sorry for the damn question :)
rakibtg 0 Light Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
rakibtg 0 Light Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
rakibtg 0 Light Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
rakibtg 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.