javascript - Change Jquery variables to PHP -




i need put javascript variable php variable, dont know how that. possible answers appreciatable.

<script type="text/javascript">          $(document).ready(function(){              $('#number_of_inwards,#number_of_outwards').each(function(){                var product_name,total_stock;                $('#product_name').change(function(){                  product_id = $('#product_name').val();                    });                var hello = "13";               <?php $d = '<script>hello</script>' ?>               total_stock = <?php echo $st[$d]; ?>;               console.log(total_stock);                $(this).focusout(function(){                 var inward = parseint($('#number_of_inwards').val());                 var outward = parseint($('#number_of_outwards').val());                 $('#overall_stock').val(parseint(inward+outward));                 console.log("inside loop"+ inward + outward);               })                        })                                });      </script> 

here code.i added dummy variable

hello="13"

and tried php variable won't work, returns empty value.

thanks in advance





wiki

Comments

Popular posts from this blog

Jenkins: find build number for git commit -

firebase - How to wait value in Ionic 2 -

typescript - Typings for sub-folders inside a root index.d.ts -