You might want to consider IR sensors. They are probably cheaper and look like they would be easier to use if you are fairly new to programming, since they can directly interface with the Arduino analog input pins (the ultrasonic sensors need to be polled). I did a quick search and found this sensor:
http://www.acroname.com/robotics/parts/R144-GP2Y0A02YK.html
With a range of 20cm to 150cm, it's not exactly what you were looking for, but for 13$ it producing a 0-5V analog signal within that range. The only problem here is that the Arduino only has 6 analog inputs.