![]() |
|
|
|
||||||||||
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
Is there an easy way to replace …ÂÃ... using str replace
Hello all,
I am looking for an easy way to replace all these none english characters using str replace. At the moment i am using php Code:
Thanks
__________________
|
|
#2
|
|||
|
|||
|
That's the same way I do it to, I would like to know a better way!
|
|
#3
|
||||
|
||||
|
Use this function:
php Code:
__________________
Testing 1.. Testing 1..2.. Testing 1..2..3.. |
|
#4
|
|||
|
|||
|
I could not make it work.
Quote:
__________________
|
|
#5
|
|||
|
|||
|
Thanks, I will try this. does anyone know why these characters show up in the first place?
|
|
#6
|
|||
|
|||
|
Something to do with character set I think.
__________________
|
|
#7
|
||||
|
||||
|
__________________
$1+ CPM just for displaying Banners with High Fill rate! |
|
#8
|
|||
|
|||
|
<?
$find[] = '“'; // left side double smart quote $find[] = 'â€'; // right side double smart quote $find[] = '‘'; // left side single smart quote $find[] = '’'; // right side single smart quote $find[] = '…'; // elipsis $find[] = '—'; // em dash $find[] = '–'; // en dash $replace[] = '"'; $replace[] = '"'; $replace[] = "'"; $replace[] = "'"; $replace[] = "..."; $replace[] = "-"; $replace[] = "-"; $text = str_replace($find, $replace, $text); ?> lol, a bit old but how knows.. it still useful
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A little help about str replace | turifungia | PHP | 2 | Dec 8th 2007 1:50 pm |
| I need a Preg Replace algo to replace SRC links | softgroups | PHP | 7 | Oct 9th 2007 3:12 am |
| preg replace - replace links | pairbrother | PHP | 3 | Jun 18th 2007 2:23 am |
| I need a quick find/replace tool to replace adsense channels | justsomepoordude | Site & Server Administration | 6 | Aug 11th 2006 2:13 pm |
| str replace? | Weirfire | PHP | 7 | Sep 6th 2005 3:44 am |