I am working on hide show functionality using JavaScript
but it occurring error on console for onclick function
I am not getting why this error occurring.
PHP CODE
<?php
$page = '0';
$output.='<div id="my_section" style="display:none;">This is my section</div>';
echo $output;
?>
I page-id is grater than 0 need to display block of div my_section
e.g.
$output.='<div id="my_section" if($page>\'0\') { style="display:none;" } else { style="display:block;" }>This is my section</div>';
i am not getting how to add this condition in php please help