<?php
$single = $_SESSION['tickets'];
var_dump($single); // This returns the integer value of 24.. (or the cost of tickets)
?>
<script type="text/javascript">
var test = "<?= $single ?>";
<b>Total: </b>£<span id="test">0</span>
// i expected this to return the same value as above (24). but the value is 0 / nul.
does anyone know what im doing wrong? (this is not the full script, but all the other code does not deal with these variables) .