display-order.php

File Type: php File Location: monofiles/ File name: display-order.php
<?php

    
//re arrange menuitem depending on <pos> xml tag value
    
function display_order($xml null){
        
$navfile simplexml_load_file($xml);
        
$sort = array();
        if (
$navfile->menuitem[0] != null){
            foreach(
$navfile->menuitem as $item){
                    
$pos = (int)$item->pos;
                    
$sort[$pos] = $item;
            }
            
ksort($sort);
            return 
$sort;
        }
        else 
        return 
false;
    }
    
?>