Skip to content

Commit ca900d6

Browse files
committed
update
1 parent 81f41b0 commit ca900d6

File tree

2 files changed

+86
-44
lines changed

2 files changed

+86
-44
lines changed

LESSON 10 - الدرس/index.php

Lines changed: 26 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,27 @@
1-
2-
<?php
3-
// $getValue = 300<=>200;
4-
// echo $getValue . "<br>";
5-
// if($getValue==-1){
6-
// echo "تحقق الشرط";
7-
// }else{
8-
// echo "لم يتحقق الشرط";
9-
// }
10-
11-
$fruit = "تفاح";
12-
if($fruit == "تفاح"){
13-
echo "سعر تفاح ب 10 دولار";
14-
}elseif($fruit=="برتقال"){
15-
echo "سعر برتقال 3 دولار";
16-
}
17-
elseif($fruit=="موز"){
18-
echo "سعر موز 2 دولار";
19-
}
20-
else{
21-
echo "للأسف لا يتوفر هذه فاكهة لدينا";
1+
<?php
2+
// --
3+
// == Equal متساوية
4+
// === Identical مطابقة
5+
// != Not equal غير متساوية
6+
// <> Not equal غير متساوية
7+
// !== Not identical غير مطابقة
8+
// > Greater than أكبر من
9+
// < Less than أصغر من
10+
// >= Greater than or equal to أكبر من او يساوي
11+
// <= Less than or equal to أصغر من او يساوي
12+
// <=>
13+
14+
15+
16+
$point_student ="70 dfsdfo";
17+
18+
if($point_student >=90){
19+
echo "علامة الطالب ممتازة";
20+
}elseif($point_student>=70){
21+
echo "علامة الطالب جيد جدا";
22+
}elseif($point_student>=50){
23+
echo "علامة الطالب وسط";
24+
}elseif($point_student<50){
25+
echo "علامة الطالب ضعيفة";
2226
}
23-
24-
?>
25-
26-
<!--
27-
== Equal متساوية
28-
=== Identical مطابقة
29-
!= Not equal غير متساوية
30-
<> Not equal غير متساوية
31-
!== Not identical غير مطابقة
32-
> Greater than أكبر من
33-
< Less than أصغر من
34-
>= Greater than or equal to أكبر من او يساوي
35-
<= Less than or equal to أصغر من او يساوي
36-
<=> -->
37-
38-
39-
40-
41-
42-
43-
44-
45-
27+
?>

LESSON 18 - الدرس/index.php

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
<?php
3+
$name = "Amin";
4+
$age = 20;
5+
$salary = 2200.00;
6+
// نوع الاول - indexed array
7+
$id1 = ["Amin" , 20 , 2200.00 , "نعم"];
8+
9+
// echo "الأسم: ".$id1[0] . "العمر:" .$id1[1];
10+
11+
12+
$id2 = array("Amir" , 20 , 4200.00 , "لا" );
13+
14+
?>
15+
16+
<!DOCTYPE html>
17+
<html lang="en">
18+
<head>
19+
<meta charset="UTF-8">
20+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
21+
<title>Document</title>
22+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
23+
</head>
24+
<body>
25+
<table class="table">
26+
<thead>
27+
<tr>
28+
<th scope="col">اسم</th>
29+
<th scope="col">عمر</th>
30+
<th scope="col">راتب</th>
31+
<th scope="col">متزوج</th>
32+
</tr>
33+
</thead>
34+
<tbody>
35+
<tr>
36+
<?php
37+
foreach($id1 as $data){
38+
39+
echo " <th>$data</th>" ;
40+
}
41+
?>
42+
</tr>
43+
44+
<tr>
45+
<?php
46+
// foreach($id2 as $data){
47+
48+
// echo " <th>$data</th>" ;
49+
// }
50+
51+
for($i = 0; $i<count($id2);++$i){
52+
echo " <th>$id2[$i]</th>" ;
53+
}
54+
?>
55+
</tr>
56+
</tbody>
57+
</table>
58+
59+
</body>
60+
</html>

0 commit comments

Comments
 (0)