├── Area.php
├── BodeMassIndex.php
├── OTP.php
├── ageCalculator.php
├── capcha.php
├── capitalSmall.php
├── currencyConverter.php
├── dynamicHeading.php
├── function.php
├── grade.php
├── loop.php
├── namta.php
└── passwordGenerator.php
/Area.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/BodeMassIndex.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/OTP.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ageCalculator.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/capcha.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/capitalSmall.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/currencyConverter.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dynamicHeading.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/function.php:
--------------------------------------------------------------------------------
1 | =80 && $marks<=100){
10 | echo "You Got A+ & your Grade is 5.00";
11 | }
12 | else if($marks>=70 && $marks<=79){
13 | echo "You Got A & your Grade is 4.40";
14 | }
15 | else if($marks>=60 && $marks<=69){
16 | echo "You Got A- & your Grade is 3.50";
17 | }
18 | else if($marks>=50 && $marks<=59){
19 | echo "You Got B & your Grade is 3.00";
20 | }
21 | else if($marks>=40 && $marks<=49){
22 | echo "You Got C & your Grade is 2.00";
23 | }
24 | else if($marks>=33 && $marks<=39){
25 | echo "You Got D & your Grade is 1.00";
26 | }
27 | else if($marks>=0 && $marks<=32){
28 | echo "You Got F";
29 | }
30 | else{
31 | echo "Please Enter Valid Number";
32 | }
33 | }
34 |
35 | /**
36 | * Rectangle Square Circle
37 | */
38 |
39 | function getArea($type=null, $length , $height){
40 | $area="";
41 | $area_type="";
42 |
43 | switch ($type) {
44 | case 'r':
45 | $area= $length * $height;
46 | $area_type="Rectangle";
47 | break;
48 | case 's':
49 | $area= $length * $length;
50 | $area_type="Square";
51 | break;
52 | case 'c':
53 | $area= 3.1416*($length * $length);
54 | $area_type="Circle";
55 | break;
56 |
57 | default:
58 | echo "Something Went Wrong.";
59 | break;
60 | }
61 |
62 | echo "Area of {$area_type} is {$area}";
63 | }
64 |
65 | /**
66 | * Age Calculator
67 | */
68 |
69 | function checkAge($birthYear){
70 | $age=2022-$birthYear;
71 | return "Your birth year {$birthYear} & now you're {$age} years old.";
72 | }
73 |
74 | /**
75 | * Dynamic headline
76 | */
77 |
78 | function heading($title=null, $type='h1', $align='center', $fontFamily='arial', $fontSize=14, $color='red'){
79 | return "<{$type} style='text-align:{$align};font-family:{$fontFamily};font-size:{$fontSize};color:{$color};'>{$title}{$type}>";
80 | }
81 |
82 | /**
83 | * Body Mass Index
84 | */
85 |
86 |
87 | function BodyMassIndex($weight,$height){
88 | $BMI=$weight/($height*$height);
89 | if ($BMI<18.5) {
90 | echo "Your Height is {$height} Meter
Weight is {$weight} KG
Your BMI is {$BMI} & You're Underweight";
91 | }
92 | else if ($BMI>=18.5 && $BMI<=24.9) {
93 | echo "Your Height is {$height} Meter
Weight is {$weight} KG
Your BMI is {$BMI} & You're Normal weight";
94 | }
95 | else if ($BMI>=25 && $BMI<=29.9) {
96 | echo "Your Height is {$height} Meter
Weight is {$weight} KG
Your BMI is {$BMI} & You're Overweight";
97 | }
98 | else if ($BMI>=30) {
99 | echo "Your Height is {$height} Meter
Weight is {$weight} KG
Your BMI is {$BMI} & You're Obesity";
100 | }
101 | }
102 | /**
103 | * Corrency Converter
104 | */
105 |
106 | function currencyConvert($amount=null,$currency=null){
107 |
108 | switch ($currency) {
109 | case 'usd':
110 | echo "$amount USD = " . 86.12 * $amount . " BDT";
111 | break;
112 |
113 | case 'cad':
114 | echo "$amount CAD = " . 67.93 * $amount . " BDT";
115 | break;
116 | case 'pound':
117 | echo "$amount POUND = " . 113.25 * $amount . " BDT";
118 | break;
119 | case 'euro':
120 | echo "$amount EURO = " . 95.03 * $amount . " BDT";
121 | break;
122 | case 'won':
123 | echo "$amount WON = " . 0.07 * $amount . " BDT";
124 | break;
125 |
126 | default:
127 | echo "Please select currency";
128 | break;
129 | }
130 | }
131 |
132 | /**
133 | * Capital Small
134 | */
135 | function capitalSmall($text=null, $type=null ){
136 |
137 | switch ($type) {
138 | case 'c':
139 | echo "