note 102106 added to spldoublylinkedlist.current

From: Date: Thu, 27 Jan 2011 07:18:32 +0000
Subject: note 102106 added to spldoublylinkedlist.current
Groups: php.notes 
Request: Send a blank email to php-notes+get-176379@lists.php.net to get a copy of this message
<?php /* * Examples of DoublyLinkedList */ $obj = new SplDoublyLinkedList(); // Check wither linked list is empty if ($obj->isEmpty()) { echo "Adding nodes to Linked List<br>"; $obj->push(2); $obj->push(3); echo "Adding the node at beginning of doubly linked list <br>"; $obj->unshift(10); } echo "<br>Our Linked List:"; print_r($obj); $curr = $obj->current(); // this will return NULL as we have not set initial node. echo "<br> Rewinding the position so that current node points to first node "; $obj->rewind(); echo "<br>Current node of the linked list:"; echo $obj->current(); // this will print first node of the linked list. echo "<br>Moving to Next node:"; $obj->next(); echo "<br>Printing the next node:"; echo $obj->current(); ?> ---- Server IP: 202.65.157.132 Probable Submitter: 125.63.77.69 ---- Manual Page -- http://www.php.net/manual/en/spldoublylinkedlist.current.php Edit -- https://master.php.net/note/edit/102106 Del: integrated -- https://master.php.net/note/delete/102106/integrated Del: useless -- https://master.php.net/note/delete/102106/useless Del: bad code -- https://master.php.net/note/delete/102106/bad+code Del: spam -- https://master.php.net/note/delete/102106/spam Del: non-english -- https://master.php.net/note/delete/102106/non-english Del: in docs -- https://master.php.net/note/delete/102106/in+docs Del: other reasons-- https://master.php.net/note/delete/102106 Reject -- https://master.php.net/note/reject/102106 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#176379) next »