I have a function(this is exactly how it appears, from the top of my file):
I want to add my 2 cent experience that might be helpful for many of you.
If you declare a function inside a loop (for, foreach, while), you will face this error message.