Consumer prices last month were 3 percent higher than a year ago, according to the Office for National Statistics.