PHP code example of krypton / element
1. Go to this page and download the library: Download krypton/element 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/ */
krypton / element example snippets
use Krypton\Element\Element;
$alert = [
'name' => 'div',
'attrs' => [
'class' => 'alert alert-info',
'role' => 'alert'
],
'elements' => [
[
'name' => 'string',
'content' => 'A simple info alert—check it out!'
]
]
];
$element = new Element($alert['name'], $alert['attrs'], $alert['elements']);
$element->render();