RE: [SMARTY] how does the php code look for this:
| From: | Hoffman, Geoffrey | Date: | Mon, 02 Dec 2002 23:59:36 +0000 |
| Subject: | RE: [SMARTY] how does the php code look for this: | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6616@lists.php.net to get a copy of this message | ||
I just did a quick test with the default sample page. Into index.php
inserted:
$phone = array("home"=>"800-555-1234",
"work"=>"877-111-1000");
$contact1 = array("name"=>"Geoff", "phone"=>$phone);
$smarty->assign("Contacts", $contact1);
and into index.tpl I inserted
{$Contacts.phone.home}<br>
and then browsed index.php...
smarty output my home phone # like the doc page says it will.
Does this help?
Geoffrey
-----Original Message-----
From: Transmitter [mailto:Transmitter@exchange-board.org]
Sent: Monday, December 02, 2002 4:18 PM
To: smarty-general@lists.php.net
Subject: Re: [SMARTY] how does the php code look for this:
hi Hoffman, Geoffrey,
HG> http://smarty.php.net/manual/en/api.assign.html
HG> ?
yes, thats works,
but i have to delete the:
"Contacts"
from the example:
$Contacts.fax
then i can assign the value for $fax and other values with an array,
but i can´t assign an array like
http://smarty.php.net/manual/en/language.variables.assoc.arrays.html
greetings Bastian Hammer
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php