PHP strcoll() Function

PHP strcmp() Function
PHP strcspn() Function

what is the syntax of the STRCOLL() function in php?

strcoll(string1,string2)
ParameterDescription
string1Required. Specifies the first string to compare
string2Required. Specifies the second string to compare
PHP STRCOLL() method

examples of the STRCOLL() function in php

Example 1. In this example, we compare strings.

<?php
setlocale (LC_COLLATE, 'NL');
echo strcoll("Hello World!","Hello World!");
echo "<br>";

setlocale (LC_COLLATE, 'en_US');
echo strcoll("Hello World!","Hello World!");
?>
PHP strcmp() Function
PHP strcspn() Function

Stay up-to-date about PHP!

We don’t spam!

en English
X
Scroll to Top