Location: PHPKode > scripts > HTML List > html-list/html_list.class.php
<?php

 /* 
  * Very simple class that builds a html list.
  * Just one method to display the html list.
  * Parameters: array of elements, font,color,background color and type
  * Author: Marcelo Santos Araujo
  * Email: marcelo at orionlab dot net
  * Website: http://www.orionlab.net
  * Date: 03/08/2005
  */



class HTML_List {

  var $link,$link_value,$font,$color,$type,$bg_color,$width;
  var $element = array();


   function HTML_List($element,$font,$color,$bg_color,$type)
   {
      $this->element = $element;
      $this->font = $font;
      $this->color = $color;
      $this->type = $type;
      $this->bg_color = $bg_color;
      $this->width= $width;
   }

   function Display()
   {
      echo "<ul style='padding-top:5px;padding-bottom:5px;background-color:$this->bg_color;list-style-type:".$this->type."' >";
      foreach($this->element as $link=>$link_value)
      {
        echo "<a style='text-decoration:none;' href='$link'><li style='padding-top:1px;font-family:verdana; color:$this->color; font-size:8pt font-style:bold;'>$link_value</li></a>";
      }
      echo "</ul>";
   }

}

?>
Return current item: HTML List