PHP code example of lucinda / console
1. Go to this page and download the library: Download lucinda/console 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/ */
lucinda / console example snippets
// defines text to be compiled
$text = '
<div style="font-style: bold">hello</div>
<table>
<thead>
<tr>
<td style="background-color: red">Name</td>
<td>Value</td>
</tr>
</thead>
<tbody>
<tr>
<td style="color: green">qqq</td>
<td>sss</td>
</tr>
<tr>
<td>ddd</td>
<td>fff</td>
</tr>
</tbody>
</table>
<ol>
<caption style="color: blue">Is Lucinda smart?</caption>
<li>
<ol>
<caption>Yes</caption>
<li style="background-color: blue">qwerty</li>
<li>asdfgh</li>
</ol>
</li>
<li>No</li>
</ol>
';
// compiling and outputting results (on windows style attributes will be ignored)
$wrapper = new Lucinda\Console\Wrapper($text);
echo $wrapper->getBody();