Hi all. As a programmer migrating across from C#/Java Programming i know this might be a bit obvious, but does PHP have an equivalent to a C# stack or queue data structure?
any help would be appreciated
thanks
PHP data structures
Moderator: General Moderators
Re: PHP data structures
Arrays. They work as queues, stacks, lists (vectors, linked lists, doubly-linked lists), dictionaries/hashes...
array_push adds to the end of the array, array_unshift to the front; array_pop removes from the end, array_shift from the front.
Then reset, next, prev, current, and key to use them as linked lists.
array_push adds to the end of the array, array_unshift to the front; array_pop removes from the end, array_shift from the front.
Then reset, next, prev, current, and key to use them as linked lists.