Phosphate removal by magnetic filtration