The code below represents the concept I am after. I am trying place a simple javascript variable into a simple php variable and out put it.
I realize this code doesn;t work, but it reprents what I am attempting to do.
<script type="text/javascript">
$('#myModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget)
var trackid = button.data('trackid')
var modal = $(this)
modal.find('.modal-title').html('<p><?php $favid =' + trackid + '; ?></p>')
})
</script>
' + trackid + '
')` – Barmar May 26 '17 at 00:41