We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7471845 commit c66afb0Copy full SHA for c66afb0
chap-03/SplDoublyLinkedList.php
@@ -0,0 +1,20 @@
1
+<?php
2
+/**
3
+ * Created by PhpStorm.
4
+ * User: bert
5
+ * Date: 3/10/18
6
+ * Time: 13:53
7
+ */
8
+
9
+$bookTitles = new SplDoublyLinkedList();
10
11
+$bookTitles->push("Introduction to Algorithms");
12
+$bookTitles->push("Introduction to PHP and Data Structures");
13
+$bookTitles->push("Programming Intelligence");
14
15
+$bookTitles->add(1, "Introduction to Calculus");
16
+$bookTitles->add(3, "Introduction to Graph Theory");
17
18
+for ($bookTitles->rewind(); $bookTitles->valid(); $bookTitles->next()){
19
+ echo $bookTitles->current() . PHP_EOL;
20
+}
0 commit comments