PHP code example of newball / spacetools

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

    

newball / spacetools example snippets


    $name = $someRandomVariable . " " . "the rest of whatever text here";
    
    $message = "Etiam porta sem malesuada magna mollis euismod.";
    $message .= "\n";
    $message .= "Maecenas faucibus mollis interdum.";

    $name = $someRandomVariable . $spaceVariable . "the rest of whatever text here";
    
    $message = "Etiam porta sem malesuada magna mollis euismod.";
    $message .= $lineBreakVariable;
    $message .= "Maecenas faucibus mollis interdum.";
 php
$space = new Newball\SpaceTools\Space();
$bs = $space->spaces;
echo 'Hey,' . $bs . 'Space!';
 php
$space = new Newball\SpaceTools\Space(5,'escaped');
$bs = $space->spaces;
echo 'Hey,' . $bs . 'Tons' . $bs . 'Of' . $bs . 'Space';
 php
$newline = new Newball\SpaceTools\Newline();
$nl = $newline->nl;
echo 'Hey,' . $nl . 'A New Line!';
 php
$newline = new Newball\SpaceTools\Newline(2,'both');
$nl = $newline->nl;
echo 'Hey,' . $nl . 'A Bunch' . $nl . 'Of' . $nl . 'Lines';