Variable Number of Arguments in PHP: कई बार हमें ऐसे Functions बनाने की जरूरत पडती है, जिनमें Pass किए जाने वाले Parameters की संख्या निश्चित नहीं की जा सकती। उदाहरण के लिए यदि हम दो संख्याओं को जोडने का Function Crete करें, तो फिर उस Function का प्रयोग करके हम केवल दो ही संख्याओं को जोड सकते हैं। परिणामस्वरूप यदि हमें तीन संख्याओं को जोडना हो, तो या तो हमें निम्नानुसार Function की Nesting करनी पडेगीः $total = add(10, add(20,30)); अथवा हमें … [Read more...]
Variable Number of Arguments in PHP
Filed Under: Core PHP in Hindi Tagged With: argument function, argument list, argument of a function, argument of value, default argument, Default Arguments, default arguments in php, default parameter, default parameters, Function Argument, Function Arguments, function as argument, function parameter, function parameters, function parameters php, function with parameters, missing argument to -exec, optional arguments, optional parameter, optional parameters, parameter list, parameter php, parameter values, Parameter Variable, parameters php, passing parameters, php argument, php arguments, php array parameter, php default argument, php default parameters, php function argument, php function arguments, php function optional parameter, php function parameter, php function parameter type, php function parameters, php function with parameter, php function with parameters, php missing argument, php multiple parameters, php optional parameter, php optional parameters, php parameter, php parameters, php pass parameter, php passing parameters, value parameter, variable arguments, variable parameter