'; # Sort by "sortTitle" -- an approximation of the Plex sort title $sorted_series = array(); foreach ($all_series as $series => $seasons) { $sorted_series[ $series ] = sortTitle($series); } asort($sorted_series, SORT_FLAG_CASE | SORT_NATURAL); # Display all series echo ''; # End the sorted/filtered content echo '