Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • strcmp string function in php

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 85
    Comment on it

    The strcmp is a string function in php which compares the two strings. strcmp is a binary-safe and case-sensitive function.This means the comparison is case sensitive.

    The syntax of strcmp:

    strcmp(string1,string2)
    

    Here, the string1 is the one which is to be compared and the string2 is the one from which the string1 is to compared.

    It will return 0 if the both string1 and string2 are equal or else if string1 < string2 then <0 will be returned or if string1 > string2 then >0 will be returned by the function

    example:

    <?php
        echo strcmp("Hello","Hello");
     ?>
    

    Output
    0

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: