For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > June 2005 > dots in variable names









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 dots in variable names
Atte André Jensen

2005-06-03, 4:00 pm

Suppose I have the following in php:

$array = array('some.test' => 'text', 'more' => 'simple');
$smarty->assign('array', $array);

How do I then address the variable "some.test" in my template? Opviously
{$array.some.test} doesn't work since this is addressing a sub-array...

--
peace, love & harmony
Atte

http://www.atte.dk
Sponsored Links







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

Copyright 2008 codecomments.com