The Philadelphia 76ers narrowly beat the Miami Heat 105-104 to advance to the playoffs for a battle with the New York Knicks.