SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Hybrid View
-
Jun 29, 2007, 00:17 #1
Detect if character is upper or lowercase
Is there a PHP function that detects if a specific character in string is lower/upper case? If not, what's the best way to do this?
-
Jun 29, 2007, 00:25 #2
-
Jun 29, 2007, 00:43 #3
- Join Date
- Dec 2006
- Location
- /dev/swat
- Posts
- 619
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If u r using login script or some thing like that.
Than in ur query just specify the field as BINARY.
It will do the trick.
-
Jun 29, 2007, 01:09 #4
- Join Date
- Oct 2006
- Location
- Kathmandu, Nepal
- Posts
- 4,013
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Alternative to priti's code you can also find like this too:
PHP Code:$string = "helLo";
for($i=0;$i<strlen($string);$i++){
if(ord($string[$i]) >= 65 && ord($string[$i]) <= 90){
echo $string[$i] . "= Upper case <br>";
}
else{
echo $string[$i] . "= Lower case <br>";
}
}
Mistakes are proof that you are trying.....
------------------------------------------------------------------------
PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5
-
Jun 29, 2007, 01:16 #5
-
Jun 29, 2007, 01:20 #6
- Join Date
- Oct 2006
- Location
- Kathmandu, Nepal
- Posts
- 4,013
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Mistakes are proof that you are trying.....
------------------------------------------------------------------------
PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5
Bookmarks