variabel php href dalam peringatan javascript

echo "<script type='text/javascript'>alert('{$variable}');
window.location.href = '{$variable_contain_the_locaction}';
</script>
Roman Empire