-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson5.php
65 lines (51 loc) · 1.19 KB
/
lesson5.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
function d($v){
echo '<pre>';
var_dump($v);
echo '</pre>';
}
echo 'hello world<br>';
$firstName = 'Joffrey';
$greeting = 'Hello';
print_r("$greeting . . $firstName . !");
$firstName = 'Joffrey';
$greeting = 'Hello';
print_r("{$greeting}, {$firstName}!");
d(@$_POST['get_key']);// @- откл предупреждений
?>
<?php if(isset($_POST["get_key"])): ?>
<!-- <form method="POST" action="">
<input type="submit" name="get_key" value="GO">
</form> -->существует
<?php else: ?>
<form method="POST" action="">
<input type="submit" name="get_key" value="GO">
</form>
<?php endif; ?>
<?php if(isset($_POST["get_key"])) {?>
<!-- <form method="POST" action="">
<input type="submit" name="get_key" value="GO">
</form> -->существует
<?php } else {?>
<form method="POST" action="">
<input type="submit" name="get_key" value="GO">
</form>
<?php }
$var1[]=10;
$var1[]=20;
d($var1);
if(!true) echo "true";
else echo (int) false;
$n=0;
while ($n<5) {
echo "ruslan";
// $n++;
$n+=1;
}
$i = 0;
do {
echo $i;
} while ($i > 0);
for ($i=0, $key=10; $i<20, $key<20; $i++, $key++) {
echo "$i, $key<br>";
}