PHP code example of simbiat / array2table
1. Go to this page and download the library: Download simbiat/array2table 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/ */
simbiat / array2table example snippets
echo (new \Simbiat\ArrayToTable\Generator)->setIdPrefix('sem_edit')->setCaption('Semantic, editable')->setFooter(['#func_sum','',''])->setCheckbox(true)->setChecked(true)->setEditable(true)->setTypes(['number','string',['text','password','tel','date', 'time', 'datetime', 'seconds', 'bytes', 'price', 'checkbox', 'email', 'url', 'html', 'img', 'color']])->generate(
[
['Points'=>'1','Field'=>'Login','Value'=>'Simbiat'],
['1','Password','Simbiat'],
['1','Telephone','+74991752327'],
['1','Date of birth','12-05-1989'],
['1','Current time',time(),],
['1','Last login',time(),],
['1','Seconds','123456',],
['1','Image size','1234567',],
['1','Salary','123456',],
['1','Are you a robot?','No',],
['1','Email','[email protected] ',],
['1','Website','https://www.simbiat.dev',],
['1','Signature','<a href="https://www.simbiat.dev">Awesome website</a>'],
['1','Avatar','https://media.kitsu.io/users/avatars/41172/large.jpg'],
['1','Favorite color','006E72'],
]
);
echo (new \Simbiat\ArrayToTable\Generator)->setIdPrefix('sem_nonedit')->setCaption('Semantic, non-editable')->setFooter(['#func_sum','',''])->setCheckbox(true)->setChecked(true)->setEditable(false)->setTypes(['number','string',['text','password','tel','date', 'time', 'datetime', 'seconds', 'bytes', 'price', 'checkbox', 'email', 'url', 'html', 'img', 'color']])->generate(
[
['Points'=>'1','Field'=>'Login','Value'=>'Simbiat'],
['1','Password','Simbiat'],
['1','Telephone','+74991752327'],
['1','Date of birth','12-05-1989'],
['1','Current time',time(),],
['1','Last login',time(),],
['1','Seconds','123456',],
['1','Image size','1234567',],
['1','Salary','123456',],
['1','Are you a robot?','No',],
['1','Email','[email protected] ',],
['1','Website','https://www.simbiat.dev',],
['1','Signature','<a href="https://www.simbiat.dev">Awesome website</a>'],
['1','Avatar','https://media.kitsu.io/users/avatars/41172/large.jpg'],
['1','Favorite color','006E72'],
]
);
echo (new \Simbiat\ArrayToTable\Generator)->setIdPrefix('nonsem_nonedit')->setCaption('Non-semantic, non-editable')->setSemantic(false)->setStyling(true)->setFooter(['#func_sum','',''])->setCheckbox(true)->setChecked(true)->setEditable(false)->setTypes(['number','string',['text','password','tel','date', 'time', 'datetime', 'seconds', 'bytes', 'price', 'checkbox', 'email', 'url', 'html', 'img', 'color']])->generate(
[
['Points'=>'1','Field'=>'Login','Value'=>'Simbiat'],
['1','Password','Simbiat'],
['1','Telephone','+74991752327'],
['1','Date of birth','12-05-1989'],
['1','Current time',time(),],
['1','Last login',time(),],
['1','Seconds','123456',],
['1','Image size','1234567',],
['1','Salary','123456',],
['1','Are you a robot?','No',],
['1','Email','[email protected] ',],
['1','Website','https://www.simbiat.dev',],
['1','Signature','<a href="https://www.simbiat.dev">Awesome website</a>'],
['1','Avatar','https://media.kitsu.io/users/avatars/41172/large.jpg'],
['1','Favorite color','006E72'],
]
);
generate(
[
['Points'=>'1','Field'=>'Login','Value'=>'Simbiat'],
['1','Password','Simbiat'],
['1','Telephone','+74991752327'],
['1','Date of birth','12-05-1989'],
['1','Current time',time(),],
['1','Last login',time(),],
['1','Seconds','123456',],
['1','Image size','1234567',],
['1','Salary','123456',],
['1','Are you a robot?','No',],
['1','Email','[email protected] ',],
['1','Website','https://www.simbiat.dev',],
['1','Signature','<a href="https://www.simbiat.dev">Awesome website</a>'],
['1','Avatar','https://media.kitsu.io/users/avatars/41172/large.jpg'],
['1','Favorite color','006E72'],
]