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, 1727🔥, 0💬
Popular Posts:
How to validate the id_token signature received from Azure AD v2.0 authentication response? You can ...
How to Build my "sleep" Docker image from the Alpine image? I want the container to sleep for 10 hou...
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...
How to start Docker Daemon, "dockerd", on CentOS systems? If you have installed Docker on your CentO...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...