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
Post a Comment