Chrome Extension

Create function in PHP

    function greeting($username) {
        echo "Hello : " . $username;

We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now
Hello : John

To create a function in PHP simply add function keyword before function name and write code inside its code block. You can run a chunk of code using the PHP function and define as many functions as you want inside the PHP script.

You can also pass parameters to a function and can retrieve that parameter by its name inside the function.

Was this helpful?
Open Code Manager We are hiring