-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
36 lines (26 loc) · 881 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
// You don't need this if auto-loading is set correct up
include_once "./Padding.php";
use Diversen\Padding;
$p = new Padding();
$ary = array(
array('Some text', 'and some more text', 'more and more detailts', 'and one more'),
array('A test', 'Another', 'and the last test'),
);
// Default
echo "Default settings:\n";
echo $p->padArray($ary);
echo "\n";
echo "User defined settings:\n";
// Change init of row, between row, and end of row
echo $p->padArray($ary, $begin_row = ' | ', $between_row = ' | ', $rowend = "\n");
echo "\n";
/*
Yields:
Default settings:
Some text and some more text more and more detailts and one more
A test Another and the last test
User defined settings:
| Some text | and some more text | more and more detailts | and one more |
| A test | Another | and the last test |
*/