Sorted jagged array data structure in PHP programming language