Home >Backend Development >PHP Problem >Briefly describe what php tags are

Briefly describe what php tags are

(*-*)浩
(*-*)浩Original
2019-09-07 15:30:245197browse

Briefly describe what php tags are

##bb9bd6d87db7f8730c53cb084e6b4d2d is the parser (long tag) of PHP. All code that needs to be run must be placed in the parser.

<?php
echo "hello world";
?>

Short tagb26da186e11666e6dd99f28d6205715c72637aecae1027e7d023ac098a170986 (Recommended learning: PHP Programming from Beginner to Master)

Short tags are only used to output variables or expressions. The general usage is

<?=$a?>
<?=(表达式)?>

, which is equivalent to

<?php echo $a?>
<?php echo (表达式)?>

. It does not support structures such as if and for.

If you write

<?if(...?>

, it will become

<!--if(...-->

. Open the short tag. Open the short tag in PHP.INI: short_open_tag = On, PHP default tag character < ;?php ?>

So you must use long tags when writing programs, and short tags will be used when inserting output into html.

The above is the detailed content of Briefly describe what php tags are. 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