943,829 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 564
  • PHP RSS
Aug 26th, 2009
0

How can I remove this character •

Expand Post »
Hi everyone,

I have tried finding out how to do this everywhere but I am coming up completely blank.

I have content coming into my site that I have no control over and it has this symbol • embedded in it. I really want to remove it and I can't see how.

Can anyone shed any light on it please?

Thanks in advance!

Ricahrd
Similar Threads
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
rickya100 is offline Offline
78 posts
since Mar 2008
Aug 26th, 2009
0

Re: How can I remove this character •

Are you using an <ul> <li> ?
Sponsor
Featured Poster
Reputation Points: 550
Solved Threads: 729
Bite my shiny metal ass!
pritaeas is offline Offline
4,176 posts
since Jul 2006
Aug 26th, 2009
0

Re: How can I remove this character •

Hi pritaeas,

No I'm not using any lists. Basically I am wrapping content coming in from a CURL request in <p> tags and the • symbol is in the content.

I can't find a way to strip it with str_replace etc. Quite annoying.
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
rickya100 is offline Offline
78 posts
since Mar 2008
Aug 26th, 2009
1

Re: How can I remove this character •

try using str_replace

php Syntax (Toggle Plain Text)
  1. <?php
  2. $source = "string with • ";
  3. $newString = str_replace("•", "", $source);

that should work
Reputation Points: 19
Solved Threads: 15
Junior Poster
leviathan185 is offline Offline
105 posts
since May 2009
Aug 26th, 2009
0

Re: How can I remove this character •

never mind you posted that while i was writing that. sorry
Reputation Points: 19
Solved Threads: 15
Junior Poster
leviathan185 is offline Offline
105 posts
since May 2009
Aug 26th, 2009
0

Re: How can I remove this character •

If it is in the content, then there should be a way to delete it. Do you have a link to the offending page ?
Sponsor
Featured Poster
Reputation Points: 550
Solved Threads: 729
Bite my shiny metal ass!
pritaeas is offline Offline
4,176 posts
since Jul 2006
Aug 26th, 2009
0

Re: How can I remove this character •

OK I have to admit to being stupid on this one.

@leviathan185 while I was reading your comment it occurred to me that I was trying string replace while messing around with htmlentities as well. I hadn't actually tried str_replace simply using the character. I know stupid. And guess what. It worked.

Sorry for the oversight guys, thanks to everyone who posted.


Richard
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
rickya100 is offline Offline
78 posts
since Mar 2008
Aug 26th, 2009
0

Re: How can I remove this character •

Click to Expand / Collapse  Quote originally posted by rickya100 ...
OK I have to admit to being stupid on this one.

@leviathan185 while I was reading your comment it occurred to me that I was trying string replace while messing around with htmlentities as well. I hadn't actually tried str_replace simply using the character. I know stupid. And guess what. It worked.

Sorry for the oversight guys, thanks to everyone who posted.


Richard

it happens to us all, I have done it a few times myself Glad I was a help :-)
Reputation Points: 19
Solved Threads: 15
Junior Poster
leviathan185 is offline Offline
105 posts
since May 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Include, cant make it work
Next Thread in PHP Forum Timeline: File uploading errors





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC