Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Return a Value Back to the Function Caller
How To Return a Value Back to the Function Caller? - PHP Script Tips - Creating Your Own Functions
✍: FYIcenter.com
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:
<?php function getYear() { $year = date("Y"); return $year; } print("This year is: ".getYear()."\n"); ?>
This script will print:
This year is: 2006
2007-04-24, 4708👍, 0💬
Popular Posts:
Which are the various programming approaches for WCF?
How do I install JUnit? First I will download the lastest version of JUnit. Then I will extract all ...
What Is URI? URI (Uniform Resource Identifier) is a superset of URL. URI provides a simple and exten...
What Is the Difference between Formal Parameters and Actual Parameters? - Oracle DBA FAQ - Creating ...
What Is the Difference between Formal Parameters and Actual Parameters? - Oracle DBA FAQ - Creating ...