@ganeshXL:
no problem for static variables, only for repeating ones e.g. lines from the array presented in the table
@Eleventeen:
I had to read that few times to understand it.
So basically you created a template engine

Yes, the repeating lines are the problem.
That gave me following idea (basically the similar thing but different in approach):
1. create a chunk with the following type of data for the repeating variables - i’ll use %% for my own formatting - of course you can use anything else:
<table>
<!-- the following could be for example some parameters for the universal parser -->
<!-- begin repeat start=1 end=20 step=2 -->
<tr>
<td>%%somedata1%%</td>
<td>%%somedata2%%</td>
<td>%%somedata3%%</td>
</tr>
<!-- end repeat
<td>
of course, you can "call" these repeaters anytime in the chunk.
2. load a chunk and parse it and look for "repeater" comments. obviously you need a parser function that will parse this data. anything between begin and end is repeated in a loop and %% variables are replaced with actual data using str_replace. This could be done as separate snippet called at the end of the original snippet. it would be basically a very simple template engine.
3. store the output of this processed chunk template in a variable and return it as output at the end of the snippet.
4. use [[snippetname]] instead of chunk - but the chunk really holds the template data.
Now obviously there are problems. You won’t be able to use anything else in such templates like [+variables+] so you’d have to apply similar mechanism for formatting output of static (non-repeating) variables as well. But this looses the point of CMS then.
I also hate to put HTML in my snippets but so far that seems the most elegant solution.
Perhaps when you post that code for polling snippet that could give me some more ideas...