is possible to call a php function with a js var?
for example <?php print title(showResult(id); ?>
function showResult(id)
{
swal({
position: "top-end",
type: "success",
title: `<?php print title('+id+'); ?> ${id}`,
icon: 'success',
confirmButtonText: '<?php print $lang['accept']; ?>',
showConfirmButton: true,
});
}