About 3 weeks ago on a trip up to Mountians, the check engine light came on, the truck was running just fine nothing out of the normal. the next day the light went off, didn't think anything about it!

The day after that the truck started really funny, it cranked just fine, started, spitter spatter, loop for about 15 seconds and then ran fine (no engine light or anything) it has done this 3 times, then yesterday it did it again, then as witht he last time ran fine and off we went! Last night on the way home the check engine light comes on, still running fine. This morning I go out to take it to the shop and it wont start, it just cranks for a few then spitter spatter, runs for about 2 seconds then dies? Any Ideas

just looking for info so I can kind of relate to the service manager!
I guess i should have taken it in when it did it the 1st time, just thought it may have been some fuel i picked up in the valley!