Select type multiple options

Permalink
Hi evrybody,

What can I read the values of attribute type Select multiple options.

$colors = getAttribute("color");
echo "My favorite colors is :  ".$colors;


My favorite colors is : Pale grey White Dark green Pink light blue

I wish to display its colors in list, like this :
My favorite colors is :
- Pale grey
- White
- dark green
- Pink
- light blue

 
belhmidi replied on at Permalink Best Answer Reply
I do it !!!!!!

$colors= $page->getAttributeValueObject('colors');
   if (!empty($colors) && $colors <> "") {                            
      print '<p><strong>My favorite colors : </strong></p>';   
                 $li_colors  = $colors->getValueObject();
                  print('<ul>');  
                       foreach($li_colors  as $c)
                      {
                        printf("<li>%s</li>", $c);
                     }
                 print("</ul>");
      }