<?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; ?>

<?php
//$registrarcustombuttons=array_unshift($vars["registrarcustombuttons"], array("label"=>"asd","command"=>"bb"));
array_push($vars["registrarcustombuttons"],array("label"=>"asd","command"=>"bb"));
print_r($vars['registrarcustombuttons']);
/*
printv_r(
array(1) => registrarcustombuttons
array(2) => "label" => "as", "command" => "bb"
);
*/
foreach($vars['registrarcustombuttons'] as $is):
echo $is['label'].' - '.$is['command'];
endforeach;
?>