This should fix the php problem - I ought to go and seperate the cases I changed from those that I didn't.