Both Cordyline and Yucca belong to the same family Asparagaceae and look quite similar, that is why sometimes cordyline is confused as Yucca.