PHP code example of nexuslinkservices / word-wrap-helper

1. Go to this page and download the library: Download nexuslinkservices/word-wrap-helper 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/ */

    

nexuslinkservices / word-wrap-helper example snippets




use WordWrapHelper\WordFormatter;

$wordFormatter = new WordFormatter();
        
$content = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.";

$result = $wordFormatter->wrap($content, 30, '-<br/>');

echo $result;