How can I remove this character •

Thread Solved

Join Date: Mar 2008
Posts: 78
Reputation: rickya100 is an unknown quantity at this point 
Solved Threads: 1
rickya100 rickya100 is offline Offline
Junior Poster in Training

How can I remove this character •

 
0
  #1
Aug 26th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 883
Reputation: pritaeas will become famous soon enough pritaeas will become famous soon enough 
Solved Threads: 144
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Practically a Posting Shark

Re: How can I remove this character •

 
0
  #2
Aug 26th, 2009
Are you using an <ul> <li> ?
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 78
Reputation: rickya100 is an unknown quantity at this point 
Solved Threads: 1
rickya100 rickya100 is offline Offline
Junior Poster in Training

Re: How can I remove this character •

 
0
  #3
Aug 26th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 101
Reputation: leviathan185 is an unknown quantity at this point 
Solved Threads: 14
leviathan185's Avatar
leviathan185 leviathan185 is offline Offline
Junior Poster

Re: How can I remove this character •

 
1
  #4
Aug 26th, 2009
try using str_replace

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

that should work
@ I'm gonna live forever, or die trying.

@ A wise man once told me, in order to understand recursion, you first must understand recursion.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 101
Reputation: leviathan185 is an unknown quantity at this point 
Solved Threads: 14
leviathan185's Avatar
leviathan185 leviathan185 is offline Offline
Junior Poster

Re: How can I remove this character •

 
0
  #5
Aug 26th, 2009
never mind you posted that while i was writing that. sorry
@ I'm gonna live forever, or die trying.

@ A wise man once told me, in order to understand recursion, you first must understand recursion.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 883
Reputation: pritaeas will become famous soon enough pritaeas will become famous soon enough 
Solved Threads: 144
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Practically a Posting Shark

Re: How can I remove this character •

 
0
  #6
Aug 26th, 2009
If it is in the content, then there should be a way to delete it. Do you have a link to the offending page ?
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 78
Reputation: rickya100 is an unknown quantity at this point 
Solved Threads: 1
rickya100 rickya100 is offline Offline
Junior Poster in Training

Re: How can I remove this character •

 
0
  #7
Aug 26th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 101
Reputation: leviathan185 is an unknown quantity at this point 
Solved Threads: 14
leviathan185's Avatar
leviathan185 leviathan185 is offline Offline
Junior Poster

Re: How can I remove this character •

 
0
  #8
Aug 26th, 2009
Originally Posted by rickya100 View Post
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 :-)
@ I'm gonna live forever, or die trying.

@ A wise man once told me, in order to understand recursion, you first must understand recursion.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 324 | Replies: 7
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC