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

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

iphone - Smoothing a rounded stroke in Core Graphics -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -