Use 1, 2, 3 instead of S, P, C for array indices
Re-format result[] in index.php. Move to server dir