Working with HTML Tags in PHP
From PHP's point of view, HTML tags are
ordinary strings. Let's, for example,
use the
<?php
echo '<b>жирный</b>';
?>
You can use multiple echo
statements:
<?php
echo '<b>';
echo 'жирный';
echo '</b>';
?>
You can use concatenation:
<?php
$str = 'жирный';
echo '<b>' . $str . '</b>';
?>
Or like this:
<?php
$str = 'жирный';
$open = '<b>';
$close = '</b>';
echo $open . $str . $close;
?>
Using the
Using the 1
to 9
.