You are here: preg_replace « PHP Programming Language « IT news, forums, messages
preg_replace

Posted by correo on 12/28/05 22:36

Hi all!

This:

$string = preg_replace('/[^a-z\d\s]/i', '_', $string);

replaces an accented letter with two underscores instead of one, when
the submitting page is in UTF8 ($string comes from a GET form). It
works well when the submitting page is encoded in ISO-8859-1 or with
other characters such as an ampersand or whatever. Any ideas why? TIA

Diego

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация