how to fetch last row data in php