Home  >  Article  >  Backend Development  >  How to convert html to php

How to convert html to php

WJ
WJOriginal
2020-05-29 14:36:074498browse

How to convert html to php

How to convert HTML to PHP?

Because html does not have php code, you can just change the source code file name suffix from html to php. If you want to write php code in it. Just add the following. Anywhere on the web page: 988bd7c6ce635682588da172eaedda80

已经将你需要的代码转化为php文件,你复制此代码到你新建立文件:比如test.php。就是你想要的效果了。
<?php
$test=<<<ttt
<div class="mid">
  <ul>
    <li class="item one">
    <h3 class="title "><a href="http://cy.whsw.cn/?cat=42">头脑风暴</a></h3>
    <p class="sub-title">头脑风暴法力图通过一定的讨论程序</p>
    </li>
    <div class="clear"></div>
  </ul>
 </div>
ttt;
echo $test;
?>

For more related tutorials, please visit php中文网

The above is the detailed content of How to convert html to php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn