forked from deoel/php-esis.16.17
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
52 lines (38 loc) · 639 Bytes
/
test.php
File metadata and controls
52 lines (38 loc) · 639 Bytes
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
<?php
//test2
/*
if(isset($_POST['a']) and isset($_POST['b'])) {
$a = $_POST['a'];
$b = $_POST['b'];
$c = $a + $b;
if($c == 3) {
echo $a.' + '.$b.' = '.$c;
} else {
echo $a.' + '.$b.' = '.$c;
}
}*/
//test3
/*function tintin($a) {
$c = array();
foreach ($a as $b) {
$c[] = $a[$b];
}
return $c;
}
$d = array(5,3,4,1,0,2);
$s = tintin($d);
echo "<pre>";
print_r($s);
echo "</pre>";*/
//test3
function milou($a) {
return array_reverse($a);
}
$d = array(5,3,4,1,0,2);
$s = milou($d);
$l = array_flip($s);
echo "<pre>";
print_r($s);
print_r($l);
echo "</pre>";
?>