-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
53 lines (42 loc) · 1.11 KB
/
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
49
50
51
52
53
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PHP</title>
</head>
<body>
<!-- <?php
// echo "<h1>HELLO PHP!</h1>";
?> -->
<body>
<?php
// 8,5,4,3,0
/* First method to create array. */
$numbers = array( 1, 2, 3, 4, 5, 6);
array_slice($numbers, 2);
// 3,4,5,6
array_slice($numbers, 0);
// 0,3,4,5,6
array_pop($numbers);
// 0,3,4,5
array_push($numbers, 8);
// 0,3,4,5,8
$reverse = array_reverse($numbers);
var_dump($numbers);
// 8,5,4,3,0
// $numbers2= array( 8,5,4,3,0);
// array_splice($numbers, 0, 1, $numbers2);
// array_pop($numbers);
// array_pop($numbers);
// array_pop($numbers);
// array_pop($numbers);
// array_pop($numbers);
// // array_push($numbers, 0)
// // array_shift($numbers);
// // array_shift($numbers);
// var_dump($numbers);
// array_push($numbers, 5, 6);
// array_pop($numbers)
?>
</body>
</html>