Fuel Injectors

What would cause a cars check engine light to come on directly after experiencing the car attempting to stall out? It feels like the engine is not getting enough gas. The RPM was normal, but the car was not responding when pressing on the gas. Could this just be that the fuel pump needs to be replaced, or is it something that is more serious?

As always and for the who knows how many times, YOU HAVE TO GET THE CODE READ.(sorry for yelling but what do you think that light is there for?)Behind that light is the info needed to answer your question.

Here’s a good format, "My car almost stalled and the check engine light came on, I got the code read and it is number P1XXX can you help me figure out what to do to fix my car’?