US president has suggested that Egypt and Jordan should to take in Palestinians from Gaza.