using PHP variables in html tag

后端 未结 6 685
臣服心动
臣服心动 2021-01-14 04:32

I get a variable from PHP code which is a webpage link, and want to use that in html tag. For example:

api();         


        
6条回答
  •  天涯浪人
    2021-01-14 05:00

    You must echo the value ... also, don't forget to escape it:

    LINK
    

    Since PHP 5.4 it's also safe to use short open tags:

    LINK
    

提交回复
热议问题