On 07-12-2009 at 00:02:54 romtek <rom...@gmail.com> wrote:

> I'd like to be able to access superglobals from within a template, but it
seems impossible now. Is there a way to do it?

You can use either



$phptal->post = $_POST;
and post/foo

I needed to access the GLOBALS array. So, I've tried php:GLOBALS['foo'] and
also php:$GLOBALS['foo'], but neither option worked.

You could try the second syntax, but access to all globals doesn't sound like a good idea. Why can't you assign necessary variables to PHPTAL object first?

regards, Kornel

PHPTAL mailing list

Reply via email to