Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php compare strings case insensitive

// Easiest way to check if two strings are the same regardless of case:
// Convert both to lowercase (or uppercase, your choice!) and compare them.

$foo="Hello There!";
$bar="HELLO THERE!";
if(strtolower($foo)===strtolower($bar)){
	echo "Strings are the same";
}
else{
	echo "Strings are different";
}
Comment

PREVIOUS NEXT
Code Example
Php :: Laravel Add regx on password 
Php :: php escape special characters 
Php :: PHP array_sum() Function 
Php :: deprcation problem phpmyadmin ubuntu 
Php :: opencart add custom description meta tag using controller file 
Php :: php get hdd serial number 
Php :: php remove last character from string 
Php :: php sleep milliseconds 
Php :: switch php version 
Php :: php debug telegram bot 
Php :: laravel date validation 
Php :: force https redirect php 
Php :: laravel model relationship find soft deleted 
Php :: ipn listener paypel php 
Php :: php kril to eng 
Php :: remove index.php from url htaccess 
Php :: link input button in php 
Php :: snap remove php stome 
Php :: randomstring php 
Php :: function that checks number only in php 
Php :: run artisan command from controller 
Php :: capitlise php 
Php :: select session php 
Php :: phpspreadsheet applyFromArray wrap 
Php :: php classes 
Php :: select sum in laravel 
Php :: verificare esistenza file in php 
Php :: install php-fpm centos 7 
Php :: php regex string start 
Php :: is alphanumeric php 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =