search

Home  >  Q&A  >  body text

Use php echo to output html, how to output variables correctly

For example

<?php
$tf = "true";
echo '<dt class="qp-ui" data-qp-ui="{ \'SideNavZippy\': 变量输出位置 }"></dt>';
?>

How to correctly output variables in echo html? Thanks

typechotypecho2716 days ago1668

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-07-07 10:37:00

    echo '<dt class="qp-ui" data-qp-ui="{ \'SideNavZippy\': ' . $tf . ' }"></dt>';

    reply
    0
  • Cancelreply