Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use user defined function in PHP ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 113
    Comment on it

    Firstly let us know What is the user defined function in php ?

    This function declaration starts with the word "function" and user defined function name is not case-sensitive.

    User defined function starts with a letter not a number.

    Use of user defined function:

    A function is a block of verbal expressions that can be used perpetually in a program.

    In bellow example you can easily understand use of user defined function

    <?php
    
    function SendMsg() {
    //create a user define function SendMsg()
         echo "Hope you are doing well!";
         //here echo your message
    }
    
    

    SendMsg(); // now call the function ?>

    when you call the function then,

    output will come following:

    Hope you are doing well!

 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: