your suggested solution - is the correct solution

cheers,
Mathew

----- Original Message ----- 
From: "Gabor Szabo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 22, 2003 10:49 PM
Subject: [htmltmpl] LOOP over array of scalar elements


> 
> It might be a very simple question but I could not find the answer so far:
> 
> In a larger hash I have an array-ref with simple scalars in it
> 
> items => [
>           'apple',
>           'banana',
>           'orange'
>          ]
> 
> I'd like to use this directly in a H:T with something like the
> following but I don't know if it's possible ?
> 
> <TMPL_LOOP NAME="items">
>   <TMPL_VAR><br>
> </TMPL_LOOP>
> 
> 
> 
> So far the only way I could think of is to go over these arrays and
> replace the scalar values with hash-refs:
> 
> 
> items => [
>           {item => 'apple'},
>           {item => 'banana'},
>           {item => 'orange'}
>          ]
> 
> and then I use
> <TMPL_LOOP NAME="items">
>   <TMPL_VAR NAME="item"><br>
> </TMPL_LOOP>
> 
> 
> thanks
> Gabor
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Html-template-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/html-template-users
>


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to