function location($where){ echo '<script>window.location.href="'.$where.'"</script>'; } location("https://youtube.com");