Tanks in the city is not a good idea because of the ease with which an enemy counterattack can suround and disable them. an APC with mounted machine guns on the turret is a much better bet.
I'd disagree with you on that point. As OPSSG has noted previous, tanks in urban environments will likely be supported by some form of infantry, ideally mechanized infantry riding in protected APCs.
The infantry cover the tanks, clear buildings, and check areas inaccessible to the armor, while the armor provides rolling cover and direct fire support for the men on foot. Basically, the mutual benefits of combined arms at work.
This obviously isn't a perfect or particularly safe solution, the very nature of urban warfare dictates this. Even with close infantry-armor co-operation, USMC infantry and armor suffered terrible losses during the Battle of Hue.
As for using APC instead of tanks, there are a few problems with this argument. Tanks have a massive psychological, armor, and firepower advantage over APCs or IFVs.
Main battle tanks are vastly better protected than a light armor vehicles, and while this extra armor adds weight, complexity and can negatively affect agility, it allows tanks to better survive the array of man-portable AT weapons urban warriors are likely to bring to the fight.
Secondly, the main guns of a tank can level buildings, blast bunkers, and pillboxes, something that an HMG or chaingun mounted on an APC simply cannot do. In order to gain a similar level of firepower with a lighter vehicle, you'd need to fit guided anti-armor weapons. And even then such a fit is not a perfect solution simply because you run into cost, reload and vulnerability issues (if you opt for externally-carried missiles, you run the risk of crew-served or possibly small arms fire disabling or damaging them).
APCs and armor play complementary roles in urban warfare, cooperating and working together. Their fundamental roles are different, and they do not and should not be used to replace one another.