Consumer Prices Index inflation increased to 3.8% in July, from 3.6% in June, the Office for National Statistics said.