Why is this not working?
<?php
mysqli_select_db($connect,dev);
$response = Select response from revbut where session='$u';
$rquery = mysqli_query($connect,$response);
$responseanswer = mysqli_fetch_array($rquery);
$re = $responseanswer['response'];
?>
<script type=text/javascript>
<?php echo $re; ?>
</script>
$re
inside JavaScript is not getting echoed. But if I place it inside the above PHP function, it is getting echoed.
EDIT - BUT THEN WHY IS THIS NOT WORKING?
if(<?php echo $re; ?>){
document.getElementById('hide').style.display = none;
}
if I PLACE the hide function outside the if - it is working.