For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > April 2005 > help about using array









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author help about using array
Lpenou

2005-04-07, 8:58 pm

Hello

I know how tu use array for <select> features in {html_options} like

..php
$email_canomaplist = array(
'yahoo' => '@yahoo.com',
'hotmail' => '@hotmail.com',
'gmail' => '@gmail.com''
);


..tpl
{section name=email loop=$num}
....
Select your Domain:
<select name="email_canomap[{$emailtab[email].mailid}]">
{html_options options=$email_canomaplist
selected=$emailtab[email].canomap}
</select>
....
{/section}

But I do not now how to dispay

"your domain is : @gmail.com"

should be something like

..tpl
your domain is : {$email_canomaplist.$emailtab[email].canomap}

I know the syntax is wrong but I've not found the correct one :-(

Regards

LAurent
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com