Greetings. I'm assuming that the variables you want to place in the "update" sections are stored in arrays, and that all arrays are the same length...
# @vars, @this, @doing, @dink are predefined. print "<h1>Some beginning HTML up here</h1>\n\n"; for ($x=0; $x<$#vars; $x++) { print "interpolate $vars[$x] when they are<p>\n"; print "between brackets like $this[$x].<p>\n"; print "<a href="$doink[$x]">$dink[$x]</a>\n"; } print "<small>The ending HTML down here</small>\n";
Is this what you're looking for? This will change significantly if you want to hold your data in something other than these arrays like a hash or something (which would be recommended). Anyway, let me know if this doesn't help; I'll expand my answer or add something. I do this sort of thing all the time with CGIs.
--Gryphon.
In reply to Re: search and variable interpolation in templates
by gryphon
in thread search and variable interpolation in templates
by ColonelPanic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |