Question
How to return a value back to the function caller?

Answers

You can return a value to the function caller by using the "return $value" statement. Execution control will be transferred to the caller immediately after the return statement. If there are other statements in the function after the return statement, they will not be executed. Here is a PHP script example on how to return values:
function getYear() {
$year = date("Y");
return $year;
}
print("This year is: ".getYear()."
");
?>
This script will print:
This year is: 2006   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What's your favourite board game?
  • Q What types of files you know?
  • Q Every expression that is an lvalue, is also an rvalue. Is the reverse true? No, lvalue denotes a place in the computer's memory. An rvalue denotes a value, so it can only be used on the right hand side of an assignment.
  • Q With reference to the risk management process, which of the following statements is correct? A. Vulnerabilities can be exploited by a threat. B. Vulnerabilities are events with the potential to cause harm to IS resources. C. Vulnerability exists because of threats associated with use of information resources. D. Lack of user knowledge is an example of a threat.
  • Q The southernmost point of India is Indira point in Andaman and Nicobar it is also known as
  • Q What is "the_time() function" in cms?
  • Q Are there advantages or disadvantages to using bea weblogic over ibm websphere or vice versa?
  • Q How can you reverse a string?
  • Q Define primary data structures?
  • Q Which Viceroy of India effected the Partition of Bengal in 1905?
  • Q A and B's temperature are 10°c and 20°c having same surface , then their ratio of rate of emmisions is ?