Inflation in the United States rose in July after 12 straight months of declines, as the cost of housing and gasoline got more expensive. But outside of those volatile sectors, so-called core inflation matched the smallest monthly increase in nearly two years.