Ragazzi, come faccio ad eliminare il case sensitive nel php?
Ragazzi, come faccio ad eliminare il case sensitive nel php?
utilità?
...::: DESIDERARE E' UMANO :::...
...::: POSSEDERE E' DIVINO :::...
...::: HAVE A NICE DAY :::...
(¯`·.¸¸.->ĐĮ ĦΞŁŁ<-.¸¸.·`¯)
http://www.djhellclub.com
Sto creando un bot... quindi se l'utente dice ciao, e poi CIAO o Ciao o cIAO nn è la stessa cosa... e a me scoccia fare ogni volta if ($input==""|$input=="") per tutte le combinazioni poi...
strtolower($stringa)
ti restituisce il lower case della stringa...
fai i confronti così..
...::: DESIDERARE E' UMANO :::...
...::: POSSEDERE E' DIVINO :::...
...::: HAVE A NICE DAY :::...
(¯`·.¸¸.->ĐĮ ĦΞŁŁ<-.¸¸.·`¯)
http://www.djhellclub.com
In pratica funziona così?
if ($input=="Ciao"||$input=="strtolower($stringa)"){
echo=("Ciao");
}
???????
if (strtolower($input) == "ciao")
...
se $input è:
Ciao
CIAO
cIAO
CiAO
ecc...
con strtolower, diventerà sempre e comunque:
ciao...
![]()
...::: DESIDERARE E' UMANO :::...
...::: POSSEDERE E' DIVINO :::...
...::: HAVE A NICE DAY :::...
(¯`·.¸¸.->ĐĮ ĦΞŁŁ<-.¸¸.·`¯)
http://www.djhellclub.com
sei sempre è comunque
$stringa="O'Meglj";
strtolower($stringa);
echo($stringa);
così xD??
grz mille!!!