1. Go to this page and download the library: Download s1syphos/php-gesetze 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/ */
s1syphos / php-gesetze example snippets
$object = new \S1SYPHOS\Gesetze\Gesetz('dejure');
$object = new \S1SYPHOS\Gesetze\Gesetz(['dejure', 'buzer']);
$obj = new \S1SYPHOS\Gesetze\Gesetz();
echo $obj->gesetzify('This is a simple text, featuring § 1 I Nr. 1 BGB as well as Art. 4c GG');
# This is a simple text, featuring <a href="https://www.gesetze-im-internet.de/bgb/__1.html" title="§ 1 Beginn der Rechtsfähigkeit">§ 1 I Nr. 1 BGB</a> as well as Art. 4c GG
# Insert test string
$text = '<div>';
$text .= 'This is a <b>simple</b> HTML text.';
$text .= 'It contains legal norms, like Art. 12 I GG.';
$text .= '.. or § 433 II nr. 2 BGB!';
$text .= '</div>';
# Initialize object
$obj = new \S1SYPHOS\Gesetze\Gesetz();
# Transform text
echo $obj->gesetzify($text);
# <div>This is a <b>simple</b> HTML text.
# It contains legal norms, like <a href="https://www.gesetze-im-internet.de/gg/art_12.html" target="_blank">Art. 12 I GG</a>.
# .. or <a href="https://www.gesetze-im-internet.de/bgb/__433.html" target="_blank">§ 433 II nr. 2 BGB</a>!
# </div>