Advertisements
Advertisements
Question
Write the purpose of parameterized Function.
Answer in Brief
Solution
Values can be passed from one function to another function thru parameters.
The parameter is also called arguments, it is like variables.
The arguments are mentioned after the function name and inside of the parenthesis. There is no limit for sending arguments, just separate them with a comma notation.
The following example has a function with two arguments ($sname and $Strength):
<?php
function School_Name($sname,$Strength) {
echo $sname.”in Tamilnadu and Student Strength is”.$Strength;
}
School_Name (“Government Higher Secondary School Madurai”,200);
School_Name (“Government Higher Secondary School Trichy”,300);
School_Name (“Government Higher Secondary School Chennai”,250);
School_Name (“Government Higher Secondary School Kanchipuram”,100);
School_Name (“Government Higher Secondary School Tirunelveli”,200);
?>
shaalaa.com
Parameterized Function
Is there an error in this question or solution?