RETURNING VALUES FROM FUNCTIONS IN PHP - PHP TUTORIAL STUDENTSBLOG100 - Anna University Multiple Choice Questions

RETURNING VALUES FROM FUNCTIONS IN PHP - PHP TUTORIAL STUDENTSBLOG100

To return the result from the functions, we need to use return statement inside the function block. by using this, we can process data inside the function block and return the results to the function calling statement.

Before seeing about returning values from functions,read this  basic function declaration and calling in php.

PHP PROGRAM TO RETURN VALUE FROM FUNCTION EXAMPLE 1:

PHP PROGRAM TO RETURN VALUE FROM FUNCTION EXAMPLE 2:
The output for both programs is 30

Click Here to get -- > Php Tutorials by Studentsblog100

No comments:

Post a Comment