Thanks in advance for any help!

I am trying to display some ubercart product attributes

I put this code in the "OUTPUT CODE:" field:

<?php
$str = $row->attributes;
$arr = unserialize($str);
print_r($arr[attributes]['attribute_label'][0]);
?>

This works perfectly if the value is coming from a text field, but it's not working if the value is from a select list.

If I use this code:

<?php
$str = $row->attributes;
$arr = unserialize($str);
print_r($arr[attributes]['attribute_label']);
?>

The output looks like this:

Array ( [11] => Select List Item )

Which makes me believe I am close.

Any ideas for how to display just the Select List Item?

Thanks!

Comments

mgladding’s picture

Title: How to display an option form a select list? » How to display an option from a select list?

Fixed a typo in the title.