Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use substr() function php ?

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 138
    Comment on it

    Definition of substr() function in php ?

    The mainly use of The substr() function returns a component of a string.

    Syntax of substr() function

    substr(string,start,length)

    You can see below example the use of substr() function.

    <?php
    //here call substr()
    echo substr("Hello Jak",6);
    
    echo substr("Hello Jak",7);
    
    ?>
    

    output will come following:

    1-when you will give length "6"

    then, result will come:

    "Jak"

    2-when you will give length "7"

    then, result will come:

    "ak"

 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: