I have this code
<?php $test = 16010; ?>
<button "onclick="myFunction('<?php echo $test; ?>')" data-toggle="modal" data-target="#myModal">Edit</button>
<script>
function myFunction(number) { document.getElementById("result").innerHTML = number;</script>
<p id='result'></p>
This code will show the result: 16010, but I don't know how to put that value in a php var. Please help!