PHP Classes

File: v2/examples/example3.php

Recommend this page to a friend!
  Classes of Thomas Björk   CSS parser   v2/examples/example3.php   Download  
File: v2/examples/example3.php
Role: Example script
Content type: text/plain
Description: Example script
Class: CSS parser
CSS parser class
Author: By
Last change: Update of v2/examples/example3.php
Date: 3 months ago
Size: 426 bytes
 

Contents

Class file image Download
<?php
// This is a simple example that loads a css files and makes it a bit more
// effective

// Include the parser
include('../cssparser.php');
// Create an instance of the parser
$css = new CSSParser();
// Read the css
$data = file_get_contents('./css3.css');
// Add the css data to the parser
$cssIndex = $css->ParseCSS($data);
// Print out the more effective css
echo "<pre>";
echo
$css->GetCSS($cssIndex);
echo
"</pre>";