2
我是smarty的新手,我想在smarty中打印一個特定的數組元素。 我使用vtiger開源,vtiger使用smarty。在smarty中打印數組的特定元素
我正在寫這個打印數組的特定元素。我在foreach循環中這樣做:
{foreach from=$LISTVIEW_ENTRIES key=j item=LISTVIEW_ENTRY name=listview}
{$LISTVIEW_ENTRIES[2]}
{/foreach}
我打印所有陣列的{$LISTVIEW_ENTRIES|@debug_print_var}
功能它給了這一點:
Array (13)
57 => Accounts_Record_Model Object (1)
->rawData = Array (20)
0 => "Nadine Campbell"
accountname => "Nadine Campbell"
1 => "Accidental Discharge of Water"
cf_763 => "Accidental Discharge of Water"
2 => "2014-09-07"
cf_765 => "2014-09-07"
3 => "Refer to Attorney"
cf_757 => "Refer to Attorney"
4 => "Progressive Insurance"
cf_737 => "Progressive Insurance"
5 => "2015-02-26 12:52:35"
modifiedtime => "2015-02-26 12:52:35"
6 => "42 SW 14 Avenue"
bill_street => "42 SW 14 Avenue"
7 => "Delray Beach"
bill_city => "Delray Beach"
8 => "Patty Mitrov"
cf_809 => "Patty Mitrov"
9 => "57"
accountid => "57"
現在你可以告訴我如何打印該數組中的特定元素? 我想從該陣列打印索引#2
PLEASE UP-VOTE答案也是。謝謝 – 2016-02-03 07:02:33