954,160 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How can I remove this character •

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

rickya100
Junior Poster in Training
78 posts since Mar 2008
Reputation Points: 13
Solved Threads: 1
 

Are you using an ?

pritaeas
Posting Expert
Moderator
5,446 posts since Jul 2006
Reputation Points: 653
Solved Threads: 873
 

Hi pritaeas,

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

I can't find a way to strip it with str_replace etc. Quite annoying.

rickya100
Junior Poster in Training
78 posts since Mar 2008
Reputation Points: 13
Solved Threads: 1
 

try using str_replace

<?php
$source = "string with • ";
$newString = str_replace("•", "", $source);


that should work

leviathan185
Junior Poster
105 posts since May 2009
Reputation Points: 19
Solved Threads: 15
 

never mind you posted that while i was writing that. sorry

leviathan185
Junior Poster
105 posts since May 2009
Reputation Points: 19
Solved Threads: 15
 

If it is in the content, then there should be a way to delete it. Do you have a link to the offending page ?

pritaeas
Posting Expert
Moderator
5,446 posts since Jul 2006
Reputation Points: 653
Solved Threads: 873
 

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

rickya100
Junior Poster in Training
78 posts since Mar 2008
Reputation Points: 13
Solved Threads: 1
 

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 :P Glad I was a help :-)

leviathan185
Junior Poster
105 posts since May 2009
Reputation Points: 19
Solved Threads: 15
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You