0
2.0kviews
Explain PHP string functions

Mumbai University > Information Technology > Sem 4 > Web Programming

Marks: 5M

Year: Dec 2014, May 2014

1 Answer
0
12views

PHP String Functions are:

  • strlen(string 1) : It finds total number of characters in the string

    Example:

    <?php
    $s=”Friend”;
            echo $s
    ?>
    

    Output: 6

  • strcmp(string 1, string 2) : It compares the two strings. In this, function returns 0 when both the strings are equal, function returns value >0 when …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.