Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

string compare in php

//In php to compare two string we can use strcmp() function
Syntax
strcmp(string1,string2);

//If both string is same then it will return 0
<?php
echo strcmp("Hello world!","Hello world!");
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #string #compare #php
ADD COMMENT
Topic
Name
1+5 =