-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
48 lines (32 loc) · 805 Bytes
/
index.php
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
48
<?php
/**
* i =0; $i < 2 => 0 < 2 = True; Increment $i = $i +1 => 0 +1 => 1
* i = 1; $i < 2 => 1 < 2 = True;
*
*/
?>
<?php
echo "<table>";
for ($i = 1; $i < 21; $i = $i + 1) {
echo "<tr><td>";
echo "2 x " . $i . "= " . ($i * 2);
echo "<br>";
echo "</td></tr>";
}
echo "</table>";
echo "<ul>";
for ($i = 1; $i < 21; $i = $i + 1) {
echo "<li>Student " . $i . "</li>";
}
echo "</ul>";
$student1Marks = 10;
$student2Marks = 20;
$student3Marks = 99;
$studentMarks = array(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 14, 55, 33, 99, 88, 77, 55);
echo "<ul>";
for ($i = 0; $i < count($studentMarks); $i = $i + 1) {
echo "<li>Student No " . ($i + 1) . "'s Marks are " . $studentMarks[$i] . "</li>";
}
echo "</ul>";
echo "waqas";
?>