My car stalled

i have a 94 chevy surburban with a 5.7 liter v8. the other day when i stopped at a store to get a drink it stalled out. i thought i had gotten bad gas from an older station the day before. it started up and i went on. the next day going to work about 6 miles down the road i stopped at a store again and when i came out it would not start for anything. well i called a friend to get me on the way to work. he did and when he ogt there about 15 min later i tried to start it one more time and it fired right up. i drove it home thinking maybe something was just loose. it started again that evening with no trouble. the next day the same thing happened. it started fine that morning and when i stopped at the store and came out it would not start. so my friend picked me up again and this afternoon it started and i drove it home. i checked all the fuses, changed the plugs and looked over everything else. but i tried to start it and it wouldnt. i took out the plug and checked it for fire when i turned the catr over and saw no spark. can anyone tell me why it is doing this?

If it has a coil, check that out. They will go intermittent at times.