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, 1504🔥, 0💬
Popular Posts:
How to use the Atom Online Validator at w3.org? w3.org feed validation service is provided at http:/...
How To Use an Array as a Queue in PHP? A queue is a simple data structure that manages data elements...
Where can I download the EPUB 2.0 sample book "The Metamorphosis" by Franz Kafka? You can following ...
How to use the "return-response" Policy statement to build the response from scratch for an Azure AP...
What Is HTML? HTML (HyperText Markup Language) is the standard markup language for creating Web page...