Today's scripting triumph

Jun 22, 2010 16:41

I wanted to figure out a convenient way to load a bunch of configuration variables for a web page "content assembly" (my name for a section of a page - I would have used "section" except that might get confusing if the site had sections with multiple pages). For example, one of the assemblies is "Find Us" which contains options for displaying any ( Read more... )

php, scripting

Leave a comment

Comments 2

digitalsidhe June 22 2010, 23:48:55 UTC
Excellent! If you're working on this sort of thing, the serialize() function (and its logical opposite) may be of use to you.

Being able to assign dynamic variables on-the-fly is so fabulously useful. I remember when I first learned to do that in Perl, and how it opened up a whole new world for me. ("Dynamic variable" is what I've learned to call what you describe as a "variable variable".)

Reply

emdiar June 23 2010, 00:21:35 UTC
Thanks for the tip on serialize(). Looks like that would do what I need elegantly. I really appreciate your feedback and guidance as I flail around with this stuff.

The docs I read about dynamic variables seemd to split pretty evenly between calling them "dynamic variables" and "variable variables." I adopted the latter because it sounds a little silly, and really, who couldn't use more silliness?

Reply


Leave a comment

Up