You can use the PHP
strcmp() function to easily compare two strings. This function takes two strings
str2 as parameters. The
strcmp() function returns
< 0 if
str1 is less than
> 0 if
str1 is greater than
str2, and 0 if they are equal.
Let's check out an example to understand how this function basically works:
<?php $str1 = "Hello"; $str2 = "Hello World"; echo strcmp($str1, $str2); // Outputs: -6 ?>
i hope you like this small article.
Show Image Preview Before Upload In jQuery Bootstrap ExampleToday, Laravelcode share one helpfull tu...
How to send email in laravel using markdownLaravelcode share with you how to send e...
How to insert HTML content into an iFrame using jQueryUse the jQuery contents() method You...
How to Check If a String Contains a Specific Word in PHPUse the PHP strpos() Function You can...
Laravel 5.5 - Yajra Datatable ExampleToday, we are share with youu how to imp...