Changeset 2666

Show
Ignore:
Timestamp:
05/12/2008 08:06:43 AM (6 months ago)
Author:
Shadowhand
Message:

Added html::anchor_array()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/helpers/html.php

    r2593 r2666  
    115115 
    116116        /** 
     117         * Create an array of anchors from an array of link/title pairs. 
     118         * 
     119         * @param   array  link/title pairs 
     120         * @return  array 
     121         */ 
     122        public static function anchor_array(array $array) 
     123        { 
     124                $anchors = array(); 
     125                foreach ($array as $link => $title) 
     126                { 
     127                        // Create list of anchors 
     128                        $anchors[] = html::anchor($link, $title); 
     129                } 
     130                return $anchors; 
     131        } 
     132 
     133        /** 
    117134         * Generates an obfuscated version of an email address. 
    118135         *