Home > Backend Development > PHP Problem > How to convert html format to php format

How to convert html format to php format

藏色散人
Release: 2023-03-02 20:14:02
Original
7408 people have browsed it

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.

How to convert html format to php format

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;
?>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template