I got a syntax error on the following code. Once I took out the first line of code, the alert pops. My brain is almost dead and I can't find out why. Please help. Thanks a lot.
JS
var rss = <?php echo json_encode($test); ?>;
alert("Hello World");
Updated
html
<?php
$test=get_array();
//the $test is a multi-dimention array.
?>
<script type="text/javascript" src="js/slideshow.js"></script>
json_encodefunction output?