Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is process to pass arguments to PHP ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 197
    Comment on it

    Hi Reader's,
      Welcome to FindNerd, today we are going to discuss how to pass arguments to PHP ?

      If you want pass some arguments into function and elements of an array.
      Then Your arguments will be receive by your function as distinct parameters.

      you can see below example:

    <?php
    //here create a function
    function add_message(&$text)
    {
        //here define a variable of string and pass arguments
        $text .= "What's about you ?.";
    }
    //here another define a variable of string and pass arguments
    $string = 'hello Joe i am fine !  ';
    //here call function
    add_message($string);
    //here print youa arguments
    echo $string;
    
    ?>


    The output of the code above will be:
    hello Joe i am fine ! What's about you ?

 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: