Doubly Linked Lists in php