Global Variables: Class variables are not available across classes. If you want to have a single variable, which is available across classes, you need to define a global variable. The global variables are always preceded by the dollar sign ($).
Thank you for the opportunity to help you with your question!
the general global variables .it is not easy to get the class variables across the classes.when you are in need of a single variable which can be found across the classes,you have to have the knowledge to define the global variable.you will always find the global variable being preceded by the dollar sign $.
Please let me know if you need any clarification. I'm always happy to answer your questions.