There should be a space between the `foreach` and `(` and also between `(` and `{`