html - How to show a list with scrollbar in php -


<?php foreach ( $fields $name => $value ):      if ( $name == 'firm name' ):         ?>         <dt> <?php echo $name ?> </dt>         <dd class="tribe-meta-value"> <?php echo $value ?> </dd>     <?php endif ?>     <?php endforeach ?> 

the output code be..

firm name:
firm1,firm2,firm3..

variable $value giving firm names stored in database.

i want show these firm name in list scrollbar.. how this??

do mean this?

    <style>     #div{       border:1px solid #000;       font-family:arial;       height:100px;       width:200px;     }     ul{       list-style:none;       max-height:100px;       margin:0;       overflow:auto;       padding:0;       text-indent:10px;     }     li{       line-height:25px;     }     li:nth-child(even){       background:#eee;     }     </style>      <div id="div">       <?php     $options = "firm1, firm2, firm3";     $options = explode(',', $options);     ?>     <ul>          <?php         foreach ($options $value) {         ?>             <li><?php echo $value; ?></li>          <?php         }         ?>      </ul>  </div> 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -