sorted array data structure in PHP programming language