Running two marathons close together say, within four weeks certainly can be done. Just let me warn you: If you run hard in the first marathon, you probably won't run a great time in the second race, because you're not leaving yourself much recovery time.
You'll also have a greater risk of injury and sickness, since recovery and muscle repair can take many months.
If you're going to do it, remember the following:
Pay even closer attention to preparation, nutrition, and recovery than you normally do for a marathon. This means following a reasonable marathon training program and taking in the proper amount of carbohydrate (which should comprise 55 to 60 percent of your total calorie intake), protein and fat. You'll also need plenty of rest days.
During the month between marathons, we recommend you begin with a week of complete rest (this means no running), followed by three weeks of very easy running and some light cross-training. (Swimming and other non-weight-bearing activities are best.) If the recovery is going well, you can include one or two very relaxed speed sessions in the middle of the month and one long run of 15 to 18 miles 10 days to two weeks before the second marathon.
If the second marathon is your primary focus, use the first marathon as your final long run. Keep the pace easy and follow it with a gradual four-week taper.
Since the key to that second marathon is adequate recovery, err on the side of less training between the events rather than more training.