Thank you curly brackets!
Pirata Nervo Offline
Member
***
Posts: 235
Joined: Jan 2008
Post: #3
RE: Thank you curly brackets!
(07-14-2010 07:58 AM)ZiNgA BuRgA Wrote:  The braces aren't actually needed Tongue

PHP Code:
foreach($vars as $key => &$val) $$key =& $val;

Or you could do:

PHP Code:
extract($vars);


If it's for some templating system, you could just directly reference the array.  If a full templating system, I'd probably pre-parse it into .php files and reference the array that way.


Oh, the brackets are not needed? Thanks Tongue

I don't get your last part though.
07-14-2010 10:38 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Thank you curly brackets! - Pirata Nervo - 07-14-2010, 04:00 AM
RE: Thank you curly brackets! - Pirata Nervo - 07-14-2010 10:38 AM

 Standard Tools
Forum Jump: