PHP code example of jakub-the-developer / php-frame

1. Go to this page and download the library: Download jakub-the-developer/php-frame 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/ */

    

jakub-the-developer / php-frame example snippets



JakubTheDeveloper\PhpFrame\Frame;


$frame = new Frame(
    [
        "First line of the text",
        "Second line of the text",
        "© Copyright information",
    ]
);

echo $frame->draw();


$frame = new \JakubTheDeveloper\PhpFrame\Frame(
    [
        "First line of the text",
        "Second line of the text",
        "© Copyright information",
    ]
);

echo $frame->draw();

$configuration = new \JakubTheDeveloper\PhpFrame\FrameConfiguration(
    1, // top margin lines
    3, // bottom margin lines
    26, // margin left
    26, // margin right
    '+', // top-left corner symbol
    '+', // top-right corner symbol
    '+', // top-left corner symbol
    '+', // top-left corner symbol
    '~', // horizontal border symbol
    '|' // vertical border symbol
);

$frame = new \JakubTheDeveloper\PhpFrame\Frame(
    [
        "First, longer line of the text",
        "Second line",
        "And the third",
    ],
    $configuration
);
shell
composer