Returning data from a function

Returning data from a function in PHP is done using return keyword that follows a value or a variable that contains the data that needs to be returned by this function. The data which is returned by the function needs to match data type of a variable. For example it makes no sense to assign a string data type, when is numeric value is expected from a function.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator