Actor Cody Longo has been ordered to attend alcohol education classes after pleading no contest to a driving under the influence (Dui) charge.

The Hollywood Heights star, 25, was arrested in Los Angeles in June (13) on suspicion of being drunk behind the wheel of his car, and he has now reached a plea agreement with prosecutors.

Longo agreed to plead no contest to one charge of Dui, and was sentenced to three years of summary probation and three months of alcohol education classes. He was also ordered to attend 10 Alcoholics Anonymous meetings, according to Tmz.com.