You need to move that bracket out and place it after $htmlItem
. Like this..
$cart_items = Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems();
foreach($cart_items as $items) {
$qtyr = $items->getQty();
$htmlItem .= ' <div class="qty-btngroup">'
. '<input type="text" class="input-text qty" maxlength="12" title="Qty" size="4" value="'.$qtyr.'" name="" readonly="readonly">'
. ' </div>';
} // THIS GOES HERE
$_response = Mage::getModel('ajaxminicart/response')
->setCartitem($html);