-4

i have this php variable $post_price, and i want to pass it to that script,

 <script 

 data-transaction-total-amount=" what do i put here ?"></script>
Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
Jean Ouédraogo
  • 234
  • 2
  • 6
  • 16

2 Answers2

0

Your question is far from clear, but I think you need:

<?php
$post_price = 111;
?>

<script data-transaction-total-amount="<?=$post_price;?>">
</script>
Pedro Lobito
  • 94,083
  • 31
  • 258
  • 268
0

You just need to use <?php echo $post_price; ?>

 <script 

     data-transaction-total-amount="<?php echo $post_price; ?>"></script>
Black Fox
  • 16
  • 1