limelightsolutions Newbie

Joined: 14 Feb 2007 Posts: 3
|
Posted: 03.05.07, 1:59 pm Post subject: PHP + Forms + Extended Characters |
|
|
I have an input form which needs to accept extended characters like ü ä ö etc.. I then want to convert them into ascii/english equivalents, ä = ae etc..
I have the following code, but it doesn't seem to convert the extended characters.
| Code: | // Convert accents and extended characters into english equivalents.
$characters = array( "'" => "", "&" => "And", "(" => "", ")" => "", "-" => " " );
$umlauts = array( "ä" => "ae", "ö" => "oe", "ü" => "ue", "ß" => "ss" );
$replacements = array_merge( $characters, $umlauts );
$beer_name = strtr( strip_tags( trim( $_POST['beer_name'] ) ), $replacements ); |
Can anyone help please? |
|