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>
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>
Your question is far from clear, but I think you need:
<?php
$post_price = 111;
?>
<script data-transaction-total-amount="<?=$post_price;?>">
</script>
You just need to use <?php echo $post_price; ?>
<script
data-transaction-total-amount="<?php echo $post_price; ?>"></script>