Modify PHP. Customize how PHP calls a function

前端 未结 4 1064
终归单人心
终归单人心 2020-12-22 07:10

Can php be modified to create a custom way to call a php function without opening and closing php tags? For example, given an example function like this that is incl

4条回答
  •  生来不讨喜
    2020-12-22 07:37

    You can store all html codes in PHP variable and print it out at the end, this method can avoid many open and closing PHP tag. Like this:

    ".title()."";
    
    ?>
    

    instead of:

    <?php echo title(); ?>
    

提交回复
热议问题