in reply to search and variable interpolation in templates
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: search and variable interpolation in templates
by ColonelPanic (Friar) on Jan 30, 2001 at 23:11 UTC | |
|
Re: Re: search and variable interpolation in templates
by thealienz1 (Pilgrim) on Jan 30, 2001 at 22:56 UTC |