15-Aug-2020, 03:42 PM
I am trying to call a variable to use to identify the pages
so if the article is pandemic depression the topic is pandemic depression
calling a variable works fine in the code for the iframe code as shown
<script>
var commentics_config = {
'identifier': '<?php echo $topic ?>',
'reference': '<?php echo $topic ?>'
};
</script>
but no for the php? code
$cmtx_identifier = '<?php echo $topic ?>' ;
$cmtx_reference = '<?php echo $topic ?>' ;
instead of showing the variable results the page topic shows the php echo statement
What is the proper syntax / code for the php code above to accept and display the variable content and not the php code?
thank you
-SB
so if the article is pandemic depression the topic is pandemic depression
calling a variable works fine in the code for the iframe code as shown
<script>
var commentics_config = {
'identifier': '<?php echo $topic ?>',
'reference': '<?php echo $topic ?>'
};
</script>
but no for the php? code
$cmtx_identifier = '<?php echo $topic ?>' ;
$cmtx_reference = '<?php echo $topic ?>' ;
instead of showing the variable results the page topic shows the php echo statement
What is the proper syntax / code for the php code above to accept and display the variable content and not the php code?
thank you
-SB