order('inviterclass_amount asc')->select()->toArray(); foreach($inviterclass_list as $inviterclass){ if($inviterclass_amount>=$inviterclass['inviterclass_amount']){ $inviterclass_name=$inviterclass['inviterclass_name']; } } return $inviterclass_name; } }