Tenet Healthcare Corp. won a judge's approval of its $345-million bid to buy eight Philadelphia-area hospitals from Allegheny Health Education & Research Foundation as part of a bankruptcy reorganization. Santa Barbara-based Tenet had said it wasn't going to bid on the hospitals because Vanguard Health Systems Inc. had already bid $460 million, plus $80 million if the hospitals met certain earnings targets. But Vanguard Health withdrew its bid late Monday, citing problems with the hospitals' operations. U.S. Bankruptcy Judge M. Bruce McCullough approved the bid by Tenet, the U.S.' No. 2 operator of hospitals, after hearing more than three hours of objections to the sale by creditors, government agencies and Philadelphia-area health-care activists. Tenet operates 122 big-city and rural hospitals in 18 states. Pittsburgh-based Allegheny, a not-for-profit hospital chain, filed for Chapter 11 protection in July after it collapsed under more than $600 million in bond debt and losses averaging $26 million a month. Tenet's shares fell 38 cents to close at $29.75 on the NYSE.