Return to Snippet

Revision: 22456
at January 13, 2010 01:53 by giak


Initial Code
// Convert word special characters
function word_annihilator ($text){
	$pattern = array( '/(« )|( »)|(_ )|( _)/' ,
			  '/_/' ,
			  '/_/' ,
			  "#&\#8201;#si" );
	$replace = array( '"' ,
			  '\'' ,
			  '...' ,
			  " " );
	$text = preg_replace( $pattern , $replace , $text );
	return $text;
}

Initial URL
http://www.giacomel.fr

Initial Description

                                

Initial Title
PHP : Convert Word characters

Initial Tags
array

Initial Language
PHP