remove all items of an array except the last one in php

Solutions on MaxInterview for remove all items of an array except the last one in php by the best coders in the world

showing results for - "remove all items of an array except the last one in php"
Andrés
28 Jul 2018
1$new = array_slice($old, -1)
2