note 86011 modified in function.sql-regcase by danbrown

From: Date: Mon, 29 Sep 2008 17:01:30 +0000
Subject: note 86011 modified in function.sql-regcase by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-144880@lists.php.net to get a copy of this message
<?php function mb_sql_regcase($string,$encoding='auto'){ $max=mb_strlen($item,$encoding); for ($i = 0; $i < $max; $i++) { $char=mb_substr($item,$i,1,$encoding); $up=mb_strtoupper ($char,$encoding); $low=mb_strtolower($char,$encoding); $ret.=($up!=$low)?'['.$up.$low.']' : $char; } return $ret; } ?> --was-- function mb_sql_regcase($string,$encoding='auto'){ $max=mb_strlen($item,$encoding); for ($i = 0; $i < $max; $i++) { $char=mb_substr($item,$i,1,$encoding); $up=mb_strtoupper ($char,$encoding); $low=mb_strtolower($char,$encoding); $ret.=($up!=$low)?'['.$up.$low.']' : $char; } return $ret; } http://php.net/manual/en/function.sql-regcase.php

« previous php.notes (#144880) next »