That situation would not have occurred if the architects and engineers had done their job properly. High-rise buildings, where escape by stairs is impractical, are required to have segregation to prevent the spread of fire, and fire lifts, emergency lighting and other services which will continue working no matter what, to allow escape.
Of course these won't help if the building suffers catastrophic structural failure, but that had never happened before to a skyscraper, and short of a nuclear explosion, is only going to happen with the planned use of demolition charges throughout the structure...
There are a lot of unanswered questions about the 11th September "attacks", look up the 'Reichstag Fire', we've been there before.