PHP code example of vikpe / php-html-heading-normalizer
1. Go to this page and download the library: Download vikpe/php-html-heading-normalizer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vikpe / php-html-heading-normalizer example snippets
\Vikpe\HtmlHeadingNormalizer::promote('<h6>Foo</h6>', 3); // '<h3>Foo</h3>'
\Vikpe\HtmlHeadingNormalizer::demote('<h1>Foo</h1>', 1); // '<h2>Foo</h2>'
\Vikpe\HtmlHeadingNormalizer::min('<h4>Foo</h4><h5>Bar</h5>', 1); // '<h1>Foo</h1><h2>Bar</h2>'
composer