Felix Geisendorfer shares another helpful tip for CakePHP users out there - this time dealing with controller variables and Javascript.
If your application requires JavaScript in order to work than you have probably been looking for an efficient way to pass CakePHP controller variables to your scripts. I already mentioned this technique in my talk at CakeFest this year, but here is the full explanation.
His method sets up a new function in the controller that automatically pushes PHP arrays out to a Javascript block in your application's layout. The widget system makes it a simple process.