PHP - How to get the element before the last element from an array? -


How do I get an element in PHP5 from the element before the last element?

  $ array [count ($ array) -2]  

It should be numerically indexed. Array (to minus) You have at least 2 elements to work on it. (Obviously)


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -