Closed abhijeetdhariwal closed 3 years ago
Same issue...
<script>
var articleYear = <?php the_time('Y') ?>;
</script>
Becomes...
<script>
var articleYear = < ? php the_time('Y') ? > ;
</script>
Use like this
On Tue, 5 May 2020, 4:55 am Chris Coyier, notifications@github.com wrote:
Same issue...
Becomes...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RiFi2k/format-html-in-php/issues/37#issuecomment-623759807, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHC5DILOQYIMVMTAYU3ASTRP5FFDANCNFSM4LG3XYQQ .
see a problem with that solution. if the value is numeric there is no need for outer quotes.
Duplicate of #31