develooper Front page | perl.php.sandwich.dev | Postings from October 2005

Re: PHP Template Global Variables

Thread Previous | Thread Next
From:
David Wheeler
Date:
October 26, 2005 21:18
Subject:
Re: PHP Template Global Variables
Message ID:
232AC50D-85FD-4289-A0DB-3B8F37596EF8@kineticode.com
On Oct 26, 2005, at 7:43 PM, George Schlossnagle wrote:

> $php->eval(qq/function setBric(\$key, \$var) {
>  global \$$key;
>  \$$key = \$var;
> }/);

This worked:

     $php->eval(q/function setGlobal($key, $var) {
         global $$key;
         $$key = $var;
     }/);

Woot! Thanks, George!

David


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About