Re: [SMARTY] Variables with dots in templates
| From: | Robert Amos | Date: | Mon, 06 Sep 2004 18:19:03 +0000 |
| Subject: | Re: [SMARTY] Variables with dots in templates | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11769@lists.php.net to get a copy of this message | ||
Maybe use something like:
{if array_key_exists('utenti_servizi.tipo_abbonamento', $cb_src)}
not quite identical to using isset(),see
http://php.net/array_key_exists for more info.
-bok
On Mon, 6 Sep 2004 17:35:37 +0200, Valerio Santinelli
<tanis@altralogica.it> wrote:
> I guess I stumbled on a problem I cannot solve by myself.
>
> In my HTML template I have a form with check boxes like:
>
> <input name="cb_src[]" type="checkbox" class="ricerca"
> id="cb_src[]"
> value="utenti_servizi.tipo_abbonamento" {if
> (isset($cb_src.utenti_servizi.tipo_abbonamento))}checked{/if}>
>
> My problem is that $cb_src.utenti_servizi.tipo_abbonamento is never going to
> be set because the real variable in php is
> $cb_src['utenti_servizi.tipo_abbonamento']
> I gues that having a dot in a key of an array makes a problem for Smarty
> unless there's some other way to overcome the problem.
>
> Is there anybody who can help me?
>
> Valerio Santinelli
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>