syntax error, unexpected ‘(‘, expecting variable (T_VARIABLE) or ‘{‘ or ‘$’

Hello,

I get this error message: syntax error, unexpected '(', expecting variable (T_VARIABLE) or '{' or '$'

When running this code:

`
Rp. <div id="total"></div>

<script>

    $("#total").html({<?php number_format($("#subtot").val(), 0, '', '.'); ?>});

</script>

`

Any idea why?