{append}鍙互鍦�
杩愯鏃�
涓烘暟缁勫彉閲忓鍔犳垨鑰呭垱寤哄�笺��
Note
杩欓渶瑕佽�冭檻鐨勬槸锛屽浜庢ā鏉夸腑鍙橀噺鐨勮祴鍊硷紝鏈�濂藉敖閲忔槸鏀惧埌PHP绋嬪簭浠g爜涓繘琛屻��
灞炴��:
| 鍙傛暟鍚嶇О | 绫诲瀷 | 蹇呴�夊弬鏁� | 榛樿鍊� | 璇存槑 |
|---|---|---|---|---|
| var | string | Yes | n/a | 璧嬪�肩殑鍙橀噺鍚嶇О |
| value | string | Yes | n/a | 璧嬩簣鐨勫�� |
| index | string | No | n/a | 鏁扮粍鍏冪礌鐨勬柊绱㈠紩锛屽鏋滄病鏈夋彁渚涙鍙傛暟锛屽垯闄勫姞鐨勫�间細鍔犲埌鏁扮粍鏈�鍚庛�� |
| scope | string | No | n/a | 璧嬪�煎彉閲忕殑璁块棶鑼冨洿: 'parent','root' 鎴� 'global' |
鍙�夌殑鏍囪:
| 鍚嶇О | 璇存槑 |
|---|---|
| nocache | 涓哄彉閲忓鍔�'nocache'灞炴�� |
Example聽7.7.聽{append}
{append var='name' value='Bob' index='first'}
{append var='name' value='Meyer' index='last'}
// or
{append 'name' 'Bob' index='first'} {* short-hand *}
{append 'name' 'Meyer' index='last'} {* short-hand *}
The first name is {$name.first}.<br>
The last name is {$name.last}.
杈撳嚭锛�
The first name is Bob. The last name is Meyer.
鍙傝append()
鍜�
getTemplateVars().
