| | |
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 |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue phpmyadmin problem query radio random recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





