PHP function strcmp function example tutorial_PHP tutorial

WBOY
Release: 2016-07-20 11:00:32
Original
1143 people have browsed it

Definition and usage
The strcmp() function compares two strings.

This function returns:

0 - if the two strings are equal
"0 - if string is less than string
"0 - if string is greater than string
Grammar

strcmp(string1,string2)
Copy after login
Copy after login
Copy after login
		Parameter
Copy after login
Description
string1 必需的。指定的第一个字串比较
string2 必需的。指定第二个字符串比较
Description
string1 Required. Compares the first specified string
string2 Required. Specify a second string comparison
Copy after login
Copy after login

Tips and Instructions NOTE: The strcmp() function is binary safe and case sensitive. For example

<!--?phpecho strcmp("Hello world!","Hello world!");?-->
Copy after login
结果:0
Copy after login

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445525.htmlTechArticleDefinition and Usage The strcmp () function compares two strings. This function returns: 0 - if the two strings are equal 0 - if the string is less than the string 0 - if the string is greater than the character...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!