1.

How to define a function in PHP?(a) function {function body}(b) data type functionName(parameters) {function body}(c) functionName(parameters) {function body}(d) function functionName(parameters) {function body}This question was posed to me in class test.The above asked question is from Functions topic in chapter Arrays and Functions of PHP

Answer» CORRECT answer is (d) function functionName(parameters) {function body}

EASIEST explanation: PHP ALLOWS us to create our own user-defined functions. Any name ending with an open and closed PARENTHESIS is a function. The keyword function is always USED to begin a function.


Discussion

No Comment Found

Related InterviewSolutions