⊗ppPmBsTg 32 of 447 menu

Working with HTML Tags in PHP

From PHP's point of view, HTML tags are ordinary strings. Let's, for example, use the b tag to output bold text:

<?php echo '<b>bold</b>'; ?>

You can use multiple echo statements:

<?php echo '<b>'; echo 'bold'; echo '</b>'; ?>

You can use concatenation:

<?php $str = 'bold'; echo '<b>' . $str . '</b>'; ?>

Or like this:

<?php $str = 'bold'; $open = '<b>'; $close = '</b>'; echo $open . $str . $close; ?>

Using the i tag, output italic text.

Using the br tag, output a column of numbers from 1 to 9.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline