class book_count_handler extends views_handler_field_numeric{ function render($v){ $count = $v->book_count_count; if($count>0){ for($i=1;$i<$count+1;$i++){$options[] = $i;} $arr['#parents'][0] = 'test'; $arr['#type'] = 'select'; $arr['#options'] = $options; return theme('select',$arr); }else{ return NULL; } } }