I need to be able to replace some common foreign characters with English equivalents before I store values into my db.
For example: æ replace with <
You can define your convertable characters in an array, and use str_replace():
$conversions = array( "æ" => "ae", "ñ" => "n", ); $text = str_replace(array_keys($conversions), $conversions, $text);