Add a space after if and foreach