-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfunction.php
More file actions
47 lines (35 loc) · 900 Bytes
/
function.php
File metadata and controls
47 lines (35 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
define("BR","<br />");
function WelcomeMessage(){
echo "<h1>Welcome to PHPDocs and Learn New Skills.</h1>";
}
function WelcomeToUser($name){
echo "<h1>Welcome Mr. ".$name." to PHPDocs</h1>";
}
function Add($a,$b){
return $a+$b;
}
function Percentage($number,$total){
$per=($number/$total)*100;
return $per;
}
function ByRef(&$Counter){
$Counter++;
}
$UserCount=0;
ByRef($UserCount);
ByRef($UserCount);
ByRef($UserCount);
ByRef($UserCount);
ByRef($UserCount);
ByRef($UserCount);
echo $UserCount.BR;
WelcomeToUser("Muhammad Afzal");
echo Percentage(50,75).BR;
echo Percentage(75,100).BR;
//Table NUmber
//Start Range
//End Range
//Print the Even or Odd Number From and to specific Range
//1st=Even/Odd 2nd=From 3rd=to
?>