Ellis Kaplan / Splash News 1 / 6
Ellis Kaplan / Splash News 1 / 6

PHOENIX (AP) -- A judge has ordered rapper DMX to spend six months in a Phoenix jail for violating probation and to undergo a mental health evaluation.

RELATED: Celebs who got in trouble with the law in 2009

DMX, whose real name is Earl Simmons, admitted in court Tuesday to a single violation of probation for failing a drug test last June. He was arrested March 9.

The 39-year-old rapper was released from jail in May after serving a 90-day sentence for felony convictions including cruelty to animals, theft and two drug counts.

RELATED: Celebrity financial woes

Maricopa County Superior Court Commissioner Christine Mulleneaux says he could be released from jail earlier if he's accepted into a drug rehabilitation program.

RELATED: Read more about rapper DMX

County authorities have arrested Simmons five times, including an August 2007 raid on the rapper's north Phoenix home where they found 12 neglected dogs, three buried dogs, drugs and a cache of weapons.