PHP code example of maveius / liphte

1. Go to this page and download the library: Download maveius/liphte 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/ */

    

maveius / liphte example snippets


/** Import **/
use liphte\tags\html\Tag;
use liphte\tags\html\Attribute as a;

/** In your code (for example controller) **/
  $t = Liphte::tag();

  $result = $t->table ([ 'style' => 'border: 1px solid #070;' ],
      [
          $t->tr(
              [
                  $t->td( a::style( 'border: 1px solid #000;' ),
                      'Column 1'
                  ),
                  $t->td( a::style( 'border: 1px solid #000;' ),
                      'Column 2'
                  )
              ]
          )
      ]
  );
  echo $result . "\n";

{
    "  "maveius/liphte": "1.0"
    }
}

{
    "  "maveius/liphte": "dev-master"
    }
}