Tools, FAQ, Tutorials:
Passing an Argument to a Function in PHP
How To Pass an Argument to a Function? in PHP?
✍: FYIcenter.com
To pass an argument to a function, you need to:
Here is a PHP script on how to use arguments in a function():
<?php function f2c($f) { return ($f - 32.0)/1.8; } print("Celsius: ".f2c(100.0)."\n"); print("Celsius: ".f2c(-40.0)."\n"); ?>
This script will print:
Celsius: 37.777777777778 Celsius: -40
⇒ Variables Are Passed by Values in PHP
⇐ Returning a Value from a Function in PHP
2016-12-24, 1577🔥, 0💬
Popular Posts:
Why I am getting "The Windows SDK version 8.1 was not found" error, when building my C++ application...
Where to find EPUB Sample Files? Here is a list of EPUB sample files collected by FYIcenter.com team...
How to use the JSON to XML Conversion Tool at freeformatter.com? If you want to try the JSON to XML ...
Can Two Forms Be Nested? Can two forms be nested? The answer is no and yes: No. You can not nest two...
Where to find tutorials on HTML language? I want to know how to learn HTML. Here is a large collecti...