S. R. L.

Exemple de cod

2
0

șir compara în 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!");
?>
1
0

php compara șir

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

strcmp php

// This function is used to find whether two strings are same or not.
// Syntax
strcmp(string1,string2);
// It returns
// 0 if string1 and string2 are same
// less than zero if string1 is smaller than string2
// greater than zero if string1 is greater than string2
0
0

strcmp php

strcmp("5", 5) => 0
 

În alte limbi

Această pagină este în alte limbi

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................