Write a PHP program which reads a list of pairs of a word and a page number, and prints the word and a list of the corresponding page numbers. The number of pairs of a word and a page number is less than or equal to 1000. A word never appear in a page more than once. The words should be printed in alphabetical order and the page numbers should be printed in ascending order.
Sample Input:
apple 5
banana 6
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer