Fungi seem to grow everywhere—but they grow best in dark, moist habitats wherever organic material is available. Moisture is necessary for their growth, and some fungi obtain water from the atmosphere and/or from the medium upon which they live. When the environment becomes very dry, fungi survive by going into a resting stage or by producing spores that are resistant to drying. The optimum pH for most species is 5.6, but some fungi can tolerate and grow in pH levels ranging from 2 to 9 (for more about pH, see the chapter “Basics of Biology”). Certain fungi can grow in concentrated salt solutions or sugar solutions such as jelly or jam. Fungi also thrive in a wide range of temperatures—even refrigerated food may be susceptible to fungal invasion.