Skip to content

A PHP library to visualize PHP Array. Converts PHP Array to HTML

License

Notifications You must be signed in to change notification settings

JhulFramework/ArrayView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A PHP library to visualize PHP Array

Requirement

  • PHP version >= 5.6
  • browser with css flex support

Installation

  • Clone or download this repository
  • Include 'src/autoloader.php' in your project

Usage

require( 'src/autoloader.php' );

$helper = new \Jhul\Component\HTML\Helper\ArrayView\Helper();

$array =
[
	'key1' => 'val1',
	'key2' => 'val2',
	'key3' =>
	[
		'key3-1' => 'val3-1',
		'key3-2' => 'val3-2',
		'key3-3' => 'val3-3',
	],

	'key4' =>
	[
		'key4-1' =>
		[
			'key4-1-1' => 'val4-1-1',
			'key4-1-2' => 'val4-1-2',
			'key4-1-3' => 'val4-1-3',
		],

		'key4-2' => 'val4-2-1',
		'key4-3' => 'val4-2-1',
	],

	'key5' => 'val5',
];

echo $helper->toHTML( $array );

Screenshot

html

Releases

No releases published

Packages

No packages published