Sorry if causing troubles again =x
With the help from you guys especially Scott Harwell, I managed to get my php array passed to js array with the following code:
var horse_array = <?php echo json_encode($horse_info);?>;
However, now I encounter problem in displaying the content of array. I could not load it into my html tag with id="horse1_r".
The following is my js code:
<script type="text/javascript">
var horse_array = <?php echo json_encode($horse_info);?>;
function goto1(hid) {
$("#horse1_r").html(horse_array);
}
</script>
Your kind help will be much appreciated.