If the fuel is not flowing it causes the car to run lean(too much air not enough fuel). This causes detonation which is hamful to the engine and causes knock.
Is it knocking or is it valve train noise or is it coming from the bottom end of the engine or is it coming from the front of the engine...gotta give us a little more idea of what it's doing...does it do it at idle, or under acceleration, or all the time?
get a mechanics stethoscope or a piece of tubing and hold it up to various parts of the engine where the sound seems to be coming from to find out exactly where the noise is happening...
Perhaps a good oil change with some synthetic - Mobil 1? My old pickup truck used to knock all the time when the oil got old (even before 3k miles)...something about the lifters. Anyways...try that out. It worked for the truck.
There is a big noise difference between a rod knock and a collapsed lifter noise. If you are hearing a actual knock you will know it. A ticking coming from the engine could be a number of things. One question I would have to ask is, how many miles are on the engine and (honestly) how hard do you drive the car? Definitly not detonation if it is making the noise at idle. Tell me a bit more info about the condition of the car and drivetrain, and also a bit more detail about the noise you hear. I am no mechanic, but I have dealt with a lot of these headaches. Also you probably should not drive the car until you figure out what the noise is (especially if its a rod knock).