Php log
From w3cyberlearnings
Contents |
PHP function log
This function returns the natural logrithmn of X. For two parameters, X is a number, and Y is a based.
Syntax log
- X is a number
- mode (optional) is the base.
log(X); OR log(X,Y);
Example 1
<?php echo log(4); echo "<br/>"; echo log(8); ?>
Output
1.3862943611199 2.0794415416798
Example 2
<?php echo log(100,10); echo "<br/>"; echo log(8,2); ?>
Output
2 3