Php functionality, for lop for selections and pre-selected items