How can I pass a variable onto a javascript. Trying to use google maps. Trying to get the variable cross_streets to work on the google maps script. Any other way of doing this?
<div id="map" align="center" style="width:300px; height:300px">
<div align="center">
<?php $cross = $result['cross_streets']; ?>
<script type="text/javascript">
$(function() {
$("#map").gMap({ markers: [{address:"'<?php echo $cross ?>', New York, NY"}],zoom: 15});
});
</script>
</div>