Get Smarty

Donate

Donate Bitcoin Bitcoin
Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Buy cheap eyeglasses from Cheapglasses123.com and save up to 80%.

Buy prescription glasses from www.australiaglasses.com and save.

Cheap Glasses Now On Sale at GlassesPeople.com. Starts At $7.95.

Where to buy discount wedding dresses and cheap smart dresses free shipping - Weddingdresstrend.com

Brautkleider auf Topwedding.de

Find free files to download on allwhatyouwant.net

Looking For Affordable Wedding Dresses 2015 at Best Prices On TDBridal.com

Shop high quality cheap prom dresses on Dresswe.co.uk

Buy New Arrival Cheap Prom Dresses 2015 at JDBRIDAL Prom Dress Store

Advertisement

Name

append() 鈥 鎶婂艰拷鍔犲埌鏁扮粍銆

璇存槑

void聽append(mixed聽var);
void聽append(string聽varname,
聽聽聽聽聽聽聽聽聽聽聽聽mixed聽var,
聽聽聽聽聽聽聽聽聽聽聽聽bool聽merge);

鍦ㄨ拷鍔犵殑鏃跺欙紝瀛楃涓插皢杞崲鎴愭暟缁勭殑鍊笺備綘鍙互鏄惧紡浼犻掗敭鍊煎锛屾垨鏄仈鍚堟暟缁勩傚鏋滆缃涓変釜鍙傛暟涓簍rue鏃讹紝璇ュ煎皢鍚堝苟鍒板師鏈夋暟缁勪笂鑰屽苟闈炶拷鍔犮

Technical Note

The merge parameter respects array keys, so if you merge two numerically indexed arrays, they may overwrite each other or result in non-sequential keys. This is unlike the PHP array_merge() function which wipes out numerical keys and renumbers them.

Example聽14.4.聽append()


<?php
// 鐩存帴浣跨敤鍜宎ssign()宸笉澶
$smarty->append('foo', 'Fred');
// 杩欓噷锛宖oo宸茬粡鍙樻垚浜嗘ā鏉夸腑鐨勪竴涓暟缁勩
$smarty->append('foo', 'Albert');

$array = array(1 => 'one', 2 => 'two');
$smarty->append('X', $array);
$array2 = array(3 => 'three', 4 => 'four');
// 涓嬮潰浼氬鍔犵浜屼釜X鏁扮粍鐨勫厓绱
$smarty->append('X', $array2);

// 浼犻掕仈鍚堟暟缁
$smarty->append(array('city' => 'Lincoln', 'state' => 'Nebraska'));
?>

   

鍙傝 appendByRef(), assign()getTemplateVars()

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 13 plus 4? (Are you human?)

Advertisement