| | |
How can I remove this character •
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Mar 2008
Posts: 78
Reputation:
Solved Threads: 1
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
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
try using str_replace
that should work
php Syntax (Toggle Plain Text)
<?php $source = "string with • "; $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.
@ A wise man once told me, in order to understand recursion, you first must understand recursion.
•
•
Join Date: Mar 2008
Posts: 78
Reputation:
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
@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
•
•
•
•
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.
@ A wise man once told me, in order to understand recursion, you first must understand recursion.
![]() |
Similar Threads
- Remove exclamation marks form a text file and add to vector (C++)
- extract the "newline" character? (Python)
- How to Remove character (Visual Basic 4 / 5 / 6)
- Remove the first character of a string in a datagrid (VB.NET)
- Removing unwanted character from end of downloaded file (JSP)
- Keeping string, except for last character (VB.NET)
Other Threads in the PHP Forum
- Previous Thread: Delete rows from sql database
- Next Thread: File uploading errors
| Thread Tools | Search this Thread |
.htaccess ajax alerts apache api array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database date display dynamic echo email emptydisplayvalue error explodefunction file files folder form forms function functions google hack href htaccess html htmlspecialchars image include insert integration ip java javascript joomla keywords limit link login loop mail menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect regex remote script search securephp server sessions shot sms soap source space sql subscription syntax system table tutorial update upload url validation validator variable video web xml youtube





