Since I use selectors like $("#something" + id), I pass the variables as strings the JS functions. PHP takes care of it in its end, I believe.