Cook onions in butter until almost soft, add garlic and cook all until soft.
Sprinkle flour over butter/onion mixture, stir to form a roux.
Slowly pour in milk and broth. Stir until somewhat thickened. Add cheese, salt and pepper. Continue to stir until thickened.
Spread ham, broccoli and rice in 9x9 glass casserole pan (or similar).
Pour cheese mixture over top.
Bake for 15 minutes.
Sprinkle fried onions on top. Bake for another 15 min until cheese is bubbling but not burnt!
Note: I was out of milk and didn't want to cook rice or broccoli ahead of time. I did the onion - flour steps the same, then upped the liquid (3 Cups broth) and just added the raw rice and broccoli to the pan, let the mixture of stuff come to a boil, then simmered for a few minutes; stirred in the cheese; sprinkled the onions on top; baked for 20min. Yum!