Burti adlı üyeden alıntı: mesajı görüntüle
<?php if ($this->_tpl_vars['registrarcustombuttons']): ?>
	<li class="divider"></li>
	<?php $_from = $this->_tpl_vars['registrarcustombuttons']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['label'] => $this->_tpl_vars['command']):
	?>
	<li><a href="clientarea.php?action=domaindetails&amp;id=<?php echo $this->_tpl_vars['domainid']; ?>&amp;modop=custom&amp;a=<?php echo $this->_tpl_vars['command']; ?>"><?php echo $this->_tpl_vars['label']; ?></a></li>
<?php endforeach; endif; unset($_from); ?><?php endif; ?>

bu kod betiğine

	$registrarcustombuttons=array_unshift($vars["registrarcustombuttons"], array("label"=>"asd","command"=>"bb"));

bunu yapıyorum ama çalışmıyor arkadaşlar nerede hata yapıyom ben?

var_dump ile görüyorum array'ı eklemiş ama yazdırırken gözükmüyor?

--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 21:48:02 -->-> Daha önceki mesaj 20:30:13 --

smarty çıktısı:

                {if $registrarcustombuttons}<li class="divider"></li>
                {foreach from=$registrarcustombuttons key=label item=command}
                <li><a href="clientarea.php?action=domaindetails&amp;id={$domainid}&amp;modop=custom&amp;a={$command}">{$label}</a></li>
                {/foreach}{/if}
[COLOR="Silver"]

array_unshift fonksiyonu yeni bir değişkene atamadan kullanılır.
array_unshift($hangiDiziyeEklenecek,$hangiDiziEkle necek);
Aşağıdaki gibi denerseniz olması gerekir.

array_unshift($vars["registrarcustombuttons"], array("label"=>"asd","command"=>"bb"));