I need to pass the version no to javascript from php. But i dont want to use ajax.
$(document).ready(function(){
init();
})
<body>
...
<input type="hidden" id="version" value="<?php echo $version; ?>
....
<script>
function init() {
version = $('#version').val();
}
</script>
Can i do in this way? Or, should i use ajax?