A judge sentenced Lindsay Lohan Tuesday to 90 days in jail and an inpatient rehab program after finding the actress had violated her probation in a 2007 drug case by failing to attend alcohol education classes. The actress burst into tears after the ruling. Superior Court Judge Marsha Revel issued the sentence after listening to testimony from employees of an alcohol treatment program that Lohan had been ordered to attend. Lohan missed seven classes since December, which led to the judge's harsh rebuke moments after the “Mean Girls” star offered a tearful apology. “I did do everything I was told to do and did the best I could to balance jobs and showing up,” Lohan told the judge. “It wasn't vacation, it wasn't some sort of a joke.” Revel said she found Lohan's apology insincere, comparing it to “somebody who cheats and thinks it isn't cheating if she doesn't get caught.” Lohan was not immediately taken into custody and will be permitted to surrender on July 20. She will have to wear an ankle alcohol monitor until then. It was unclear how much time Lohan will actually spend in jail. Los Angeles Sheriff's Department spokesman Steve Whitmore said female inmates convicted of nonviolent misdemeanors serve about a quarter of their sentence but that can be further reduced by state credits.