Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php compare string

<?php
$var1 = "Hello";
$var2 = "hello";
if (strcmp($var1, $var2) !== 0) {
    echo '$var1 is not equal to $var2 in a case sensitive string comparison';
}
?>
Comment

string compare in php

//In php to compare two string we can use strcmp() function
Syntax
strcmp(string1,string2);

//If both string is same then it will return 0
<?php
echo strcmp("Hello world!","Hello world!");
?>
Comment

PREVIOUS NEXT
Code Example
Php :: laravel throttle 
Php :: string match in php 
Php :: php set title dynamically 
Php :: laravel create new file if not exists 
Php :: laravel: get last id 
Php :: transfer file using file_get_content 
Php :: php mail 
Php :: laravel cache put array 
Php :: wordpress theme widgets 
Php :: format a number with leading zeros in php 
Php :: call function in php 
Php :: css not working in live laravel project 
Php :: php check if a url exists 
Php :: get specific columns using with() function in laravel eloquent 
Php :: replace all occurrence char in string php 
Php :: php json response to ajax 
Php :: laravel controller create command in a folder 
Php :: write php online 
Php :: shortcode php wordpress 
Php :: wordpress display post categories 
Php :: run schedule laravel 
Php :: pluck laravel 
Php :: phpspreadsheet CellProtection 
Php :: root composer.json requires php ^7.3 but your php version (8.0.3) does not satisfy that requirement. 
Php :: jQuery is not defined load-scripts.php 
Php :: show woocommerce product variation in table php 
Php :: increase php_values 
Php :: route group in laravel 
Php :: mail sending setting magneto for mailhog 
Php :: append data in csv file php 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =