Home >Backend Development >PHP Tutorial >Guide to using php statements in dedecms, dedecmsphp statement guide_PHP tutorial
In DEDECMS, if you use php statement, there is {dede:php} tag that can be used. The simplest input is like
$numA = 1;
$numB = 2;
echo $numA + $numB;
{/dede:php}
It can be seen from the above statement that the dede:php tag can be used in the same way in PHP. The above statement is written as follows in PHP
Does it look similar? Let’s look at another one with an if else condition
I won’t write how to write this in php. Next we will look at the use of dede php tags in combination with sql tags.
Combined with SQL query to output a single piece of content
The content of this output is
Isn’t it very simple? Friends who need to learn can refer to this article.