htmlspecialchars

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Convert special characters to HTML entities
<?php htmlspecialchars(    string $string,    int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401,    ?string $encoding = null,    bool $double_encode = true): string
<?php <div class="w-full mx-2 py-1 mt-1 bg-yellow text-black text-center uppercase">

    <?php echo htmlspecialchars($content) ?>

</div>
<?php <div>

    <?php foreach ($elements as $element) { ?>

        <div class="text-gray mx-2">

            ⇂ <?php echo htmlspecialchars($element) ?>

        </div>

    <?php } ?>

</div>
<?php     <span class="<?php if ($title) {

        echo 'ml-1';

    } ?>">

        <?php echo htmlspecialchars($content) ?>

    </span>

</div>
<?php <div class="flex mx-2 max-w-150">

    <span>

        <?php echo htmlspecialchars($first) ?>

    </span>

    <span class="flex-1 content-repeat-[.] text-gray ml-1"></span>

    <?php if ($second !== '') { ?>
<?php     <span class="flex-1 content-repeat-[.] text-gray ml-1"></span>

    <?php if ($second !== '') { ?>

        <span class="ml-1">

            <?php echo htmlspecialchars($second) ?>

        </span>

    <?php } ?>

</div>
<?php             $value = $value->value;

        }



        return htmlspecialchars($value ?? '', ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8', $doubleEncode);

    }

}