I'm new to PHP and I've been exploring different aspects of the language. Today, I was trying to declare a global variable in my PHP code, but I couldn't figure out how to do it. I want to declare a variable that can be accessed from any part of my script, without the need to pass or include it again and again.
I've read about local and global scopes in PHP, but I'm still a bit confused about how to actually declare a global variable. Can someone please help me out with this? Any explanation or example would be greatly appreciated.
Thanks in advance!