PHP + Forms + Extended Characters

 
Post new topicReply to topic    Webmaster Site Forum Index -> Coding Forum
View previous topic :: View next topic  
Author Message
limelightsolutions
Newbie
Newbie


Joined: 14 Feb 2007
Posts: 3

PostPosted: 03.05.07, 1:59 pm    Post subject: PHP + Forms + Extended Characters Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topicReply to topic All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 
Link to us  |   Advertising  ||   Contact us

website design by:
Online Web Design
powered by phpBB - style by: ForumMonkeys