Hello I have this simple problem in my code. I'm using php echo to use my javaScript inside in my model, my question is I want to use my JS variable inside php echo and pass it through url using GET method my problem is my variable is read as string a variable
echo "<script>
$('.btnclick').on('click', function(){
var ris_id = $(this).attr('data-id');
window.open('pdf_report?d="."ris_id"."' , '_blank');
});
</script>"
Here's my sample code, my problem is that I want to pass the ris_id as a variable not a string to the new tab that will open after click the button.