What is the purpose of the var keyword and when should I use it (or omit it)?

If you’re in the global scope then there’s not much difference. Read Kangax’s answer for explanation If you’re in a function then var will create a local variable, “no var” will look up the scope chain until it finds the variable or hits the global scope (at which point it will create it): // These … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)