Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.