note 17625 deleted from function.preg-replace by jimw

From: Date: Thu, 20 Dec 2001 23:30:10 +0000
Subject: note 17625 deleted from function.preg-replace by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23567@lists.php.net to get a copy of this message
<P> You can use preg_replace to convert special charaters to upper or lower case. It also handles normal characters: </P> Convert to upper case: $s = preg_replace("/([a-z]|[à-þ])/e", "chr(ord('\\1')-32)", $s); Convert to lower case: $s = preg_replace("/([A-Z]|[À-Þ])/e", "chr(ord('\\1')+32)", $s);

« previous php.notes (#23567) next »