This happened to me one time on an older electric dryer. I was told it
was the heating element, so I promptly went to an appliance dealer and
bought one and then ended up calling a repairman. Turned out that the
problem was at my breaker box and not in the element. One of the
breakers had come "unseated" and so I was only getting 110V to the
dryer instead of 220V. Hence, the dryer would spin and such, but no
generate no heat.