I Know this has been posted before. I've been using an example from an
earlier post but it only produces one of my 5 my options.
This is in the model:

function generateRatingList() {
                foreach($this->_tableInfo->value AS $field) {
                        if($field['name'] == 'rating') {
                                $enum = $field['type'];
                                break;
                        }
                }
                foreach(split("','", substr($enum, 6, -2)) AS $num => $name) {
                $return[$name] = $name;
                return $return;
        }
}

and this in the controller:

$this->set('ratingArray',$this->Userreview->generateRatingList());

any ideas?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to