A simple method in php to determine whether two strings are equal, php string_PHP tutorial

WBOY
Release: 2016-07-13 09:46:38
Original
931 people have browsed it

A simple method for php to determine whether two strings are equal, php string

The example in this article describes a simple method for php to determine whether two strings are equal. Share it with everyone for your reference. The specific implementation method is as follows:

<&#63;php 
function strcomp($str1,$str2){ 
  if($str1 == $str2){ 
    return TRUE; 
  }else{ 
    return FALSE; 
  } 
} 
echo strcomp("First string","Second string");
//Returns FALSE 
echo strcomp("A string","A string");
//Returns TRUE 
&#63;>

Copy after login

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1031490.htmlTechArticlephp method to simply judge whether two strings are equal, php string This article tells the example of php simply judging whether two strings are equal Method to determine if strings are equal. Share it with everyone for your reference. Specific actual...
Related labels:
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