-
Notifications
You must be signed in to change notification settings - Fork 0
/
PHP.txt
126 lines (106 loc) · 2.56 KB
/
PHP.txt
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
برمجه php
LocalHost سيرفر المحلي
ملف Server
--------------------------------------------
Syntax
<?php
echo "raed";
?>
--------------------------------------------
Data type
<?php
%name = 'Raed';
echo %name;
$integer1 = 100;
--------------------------------------------
Check data type
<?php
$x = null
$a = is_bool($x);
--------------------------------------------
Echo
--------------------------------------------
String php
$x : "i love mazen";
Echo Str_word_count ) ($x);
( عدد الكلمات )
--------------------------------------------
Concatenation ربط سلسله مع بعض
$firstbame = "Raed";
$lastname = "Habib";
echo $firstbame . $lastname
--------------------------------------------
العمليات الحاسبيه
%num1 = 12;
$num2 = 5;
%result = $num1 % $num2;
echo $result;
--------------------------------------------
if
%x = 10;
if($x != 11){
echo "تم الامر بنجاح "
}else{
echo "فشل الامر"
}
--------------------------------------------
Switch
--------------------------------------------
While loop برمجه تكرر
<?php
$x = 1;
While($x <= 20){
echo $x;
++ $x;
}
--------------------------------------------
For loop حلقه تكرار
For($x = 1; $x <= 20; ++$x ){
Echo "<h1>" . $x . "</h1>";
}
--------------------------------------------
Do while loop
<?php
$x = 1;
do{
echo $x;
++$x;
}while($x <= 10);
--------------------------------------------
BREAK CONTINUE
--------------------------------------------
Array مصفوفات
<?php
%id100 = array ("Raed", 24, "Hafar");
Print_r($id100);
--------------------------------------------
Foreach
--------------------------------------------
Function
<?php
function test(){
echo "hello world";
}
test();
--------------------------------------------
Explode
--------------------------------------------
Emplode
--------------------------------------------
include and requiry in
--------------------------------------------
File system - file exists in
--------------------------------------------
File get contents
<?php
echo file_get_contents("https://www.youtube.com/");
--------------------------------------------
Mkdir and
--------------------------------------------
Copy
--------------------------------------------
Rename
--------------------------------------------
Pathinfo
--------------------------------------------
Fopen