Answer the question
In order to leave comments, you need to log in
PHP output in HTML files?
Good day! Please tell me where to find information on php where it is described what the php tags do so to speak. And it is "<?php ?>", "<? ?>", "<?= ?>" that interests. I remember reading it somewhere, but I can't remember where :(
Answer the question
In order to leave comments, you need to log in
<?php ?> - opening and closing php code tag, if there is only php code in the file (for example, some class), the closing tag is not needed. The tag is correct, according to the standard, it is better to use it.
<? ?> - short tags, a shortened version of the one above. Can be disabled in the config, better not to use.
<?= ?> - they are the same, <?=$var?> analogue of <?php echo $var; ?>
In .htaccess add something like thisAddType application/x-httpd-php .html .htm
The tags tell the interpreter where the actual php code is located. The rest of the code is skipped.
That is, the interpreter goes through the code, finds one of the opening tags and processes it until it meets the closing tag, then repeats.
Explanations SharuPoNemnogu will not repeat =)
I took up php, I can’t remember where to read about it?
phptherightway.ru
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question