Work on php index

Basic structure and category function.