How to convert html to php: first find the html file that needs to be converted to php; then change the source code file name suffix from html to php; finally add the code as " anywhere in the web page "That's it.
Convert html format to php format
Because html does not have php code , so 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:
The code you need has been converted into a php file. You can copy this code to your newly created file: such as test. php. That's the effect you want.
<?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; ?>
Recommended: "PHP Tutorial"
The above is the detailed content of How to convert html format to php format. For more information, please follow other related articles on the PHP Chinese website!