|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-04-13 20:47 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 23:00:02 2025 UTC |
It would be awesome if PHP had the strip_accents() function. Something like strip_tags(), only it removes the accented letters and replace them with their non-accented version. For example: <? echo strip_accents("Bonjour V?ronique, comment ?a va?") ?> gives: Bonjour Veronique, comment ca va? I suppose it would be even better if you could have an optional parameter of allowable accents too. It would be very useful for searching databases. For example: on my site, people can search a music band database, but if they don't have the umlauts on their keyboards, and if they search for a band like say "M?tley Cr?e" without typing the umlauts they might not find it. So I have to use an alternate spelling field, but it would be awesome if there were a built-in strip_accents() function. I'm sure it could have many many more applications too :)