• PHP Video Tutorials

PHP - Function strncasecmp



Syntax

strncasecmp(string1,string2,length)

Definition and Usage

It is used compare two strings.

Return Values

It returns the string functions

Parameters

Sr.No Parameters & Description
1

string1

It specifies first string to search

2

string2

It specifies second string to search

3

length

It specifies number of characters from each string to be used in the comparison

Example

Try out the following example

<?php
   echo strncasecmp("Example!","example!",6);
?>

This will produce following result −

0
php_function_reference.htm
Advertisements