Jump to content

html special chars wont go away !


clowes

Recommended Posts

This has been bugging me for too long now. I dont understand or appreciate it, and I cant sort it out for the life of me. Help greatly appreciated.

 

So I query a server, and collect some data. I display the data on my page.

The following word:

Interdomain’s

is present. If I view source, it is displayed as

Interdomain’s

 

I want to remove all words after this, so what I do is use strpos to find the position, and then use substr to stop at this point. Simple.

 

If I strpos either Interdomain’s, or Interdomain’s I get nothing....

If I strpos Interdomain, I get the right position... I.E These special chars are preventing me from getting what I want.

 

 

Another example.

The following is displayed:

————————————————————————

 

On viewing source I see:

————————————————————————

 

In this case I simply want to delete these dashes, so I use str_replace(); Putting either of the above into str_replace does nothing....

 

 

Ive tried utilizing strip_tags(); htmlspecialchars_decode(); etc to give just a plain text version... they do absolutely nothing.

 

I am super confused.Help!

Link to comment
https://forums.phpfreaks.com/topic/166840-html-special-chars-wont-go-away/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.