-1

I've created an online store with php language.

I need the section to filter the price of the product (price range).

In the javascript section, I need to use the php variable instead of from and to.

My javascript code :

<script>
    $('.price_range').jRange({
    from: 0,
    to: 67390000,
    step: 50,
    format: '%s USD',
    width: 300,
    showLabels: true,
    isRange : true
});
</script>


Please guide how to use the php variables in this JavaScript code

Pankaj Makwana
  • 3,030
  • 6
  • 31
  • 47

1 Answers1

0

You can do that by using below code:

<?php echo $price_range;?>

or

<?= $price_range ?>
Sadhu
  • 850
  • 2
  • 9
  • 18