my car starts run for awhile then shuts off on 1996 Nissan Sentra

i have change the fuel filter changed the spark plugs still does the same thing can drive up to 10 miles untill the engine starts to shut off

Asked by for the 1996 Nissan Sentra
when you changed the spark plugs what are the condition? if its dark deposits around, i would do the compression test first so you will know the condition of your engine. check fuel pump and fuel pressure, check fuel injectors and clean it.