Buy the one with the best frame (one of the reasons I bought the low end Specialized Rockhopper over the top end HardRock). The components can be upgraded as you wear them out.
I'm at over 10,000 miles on my Rockhopper and have already had to replace the wheels (upgrading to disk brakes while I was at it), cassette and seat. This year I either need to replace the fork or get a new hardtail.