Call php function in Jquery

Question

how can I pass a variable to the following code.

var price = <?php get_update_dynamic_price_xyz(4); ?>;

If I manually add 4 to the php function it gives me the correct result but I have tried everything to pass it through a jquery variable. The following doesn’t seem to work.

var qty = 5;
var price = <?php get_update_dynamic_price_xyz(qty); ?>;

It is as if it doesn’t see the value of jqeury variable. Any help please!

0
B. Venter 1 month 2021-10-29T02:49:12-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse