The prices of fuel and food climbed in June, latest figures show.