It's very rare and extremely un-recommended to get a loan for a PhD. For most people, at worst, you're losing money by opportunity cost.