php coding for ninja book title sorter