note 97687 deleted from function.sql-regcase by danbrown

From: Date: Mon, 03 May 2010 14:20:32 +0000
Subject: note 97687 deleted from function.sql-regcase by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-168885@lists.php.net to get a copy of this message
Note Submitter: jeprubio ---- Little modification of Irker's mb_sql_regcase function: <?php function mb_sql_regcase($string, $encoding = 'auto') { $ret = ''; $max = mb_strlen($string,$encoding); for ($i = 0; $i < $max; $i++) { $char = mb_substr($string, $i, 1, $encoding); $up = mb_strtoupper($char,$encoding); $low = mb_strtolower($char,$encoding); $ret .= ($up != $low) ? '['.$up.$low.']' : $char; } return $ret; } ?>

« previous php.notes (#168885) next »