What is the best way to echo the variable get_parestotal?
Some help please! Thank you
<script type="text/javascript">
$(document).ready(function(){
var get_parestotal = 0
$(".parestotal").each(function(){
get_parestotal += parseFloat($(this).text());
});
alert(get_parestotal);
});
</script>
<? echo json_encode($get_parestotal); ?>
echo
in JavaScript. – Adjuvant