PHP code example of demi / safe-text

1. Go to this page and download the library: Download demi/safe-text 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/ */

    

demi / safe-text example snippets


<?= \demi\safeText\Widget::widget(['text' => '+555 478 24 75']) 

<?= \demi\safeText\Widget::widget([
    'url' => 'mailto:[email protected]',
    'text' => '[email protected]',
]) 

<?= \demi\safeText\Widget::widget([
    'url' => 'skype:girlfriend?chat',
    'text' => 'girlfriend',
    'linkTextTemplate' => '<i class="fa fa-skype"></i> {text}',
    'linkOptions' => [
        'class' => 'skype-link',
        'target' => '_blank',
    ],
])