$SPL =new spldoublylinkedlist (); Instantiate an object $spl->push ("Sdfsaf") of a doubly linked list; Added to the top (top) (tail) of the list $SPL->push (111); $SPL->push (' 1 '); $SPL->unshift ("100"); The value added to the bottom of the list (bottom) (head) value in the doubly linked list $SPL->shift (); //Delete bottom (head) at the location of the values &NB SP; $spl->pop (); //pop-up top value $SPL->top (); //get Top (trailing) elements $SPL-&G T;count () Number of; //nodes $SPL->isempty (); is currently empty, returns true for null $SPL->rewind (); //move to bottom (head) position &NB sp; $spl->current (); //Get the value of the current node $spl->next (); //Move the node down  &N bsp; $spl->prev (); //Return to previous node//Loop through linked list $SPL->rewind ();   &NBsp while ($name = $spl->current ()) { echo $name. " \ n "; $SPL Next (); }/******************* / &nbs P for ($spl->rewind (); $spl->valid (); $spl->next ()) { echo $spl->current (). " \ n "; } var_dump ($spl->valid ()); Returns true if the node is a valid node, otherwise false//NOTE: When $spl->current (), $SPL->valid () must be $spl->rewind (); Otherwise point to empty nodes
The above describes the PHP standard database SPL data structure-----spldoublylinkedlist (doubly linked list), including the aspects of the content, I hope to be interested in PHP tutorial friends helpful.