PHP Classes

Packages of Ben Vautier

Recommend this page to a friend!
  All class groups  >  All authors  >  Packages of Ben Vautier (2)  >  Mission progress status  >  Reputation  
Picture of Ben Vautier
Name: Ben Vautier <contact>
Classes: 2
Country: Australia Australia
Age: 47
All time rank: 91113 in Australia Australia
Week rank: 195 Up1 in Australia Australia Up
All time users: 3532
Week users: 0
 
  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z  
  Files folder image csv_bv  
Retrieve data from CSV files (Ms Excel too)
This class can be used to parse and retrieve data from CSV files either in the standard or MS Excel format.

Two methods are provided to either process the file a line at a time or return the whole csv file as an array

It can:

- Handle line breaks within quoted fields
- Support different character separator (usually a comma or semicolon) in quoted fields
- Optionally remove leading and trailing white spaces and tabs
- Optionally skip empty rows
- Support Windows and Unix line breaks (care must be taken with Macintosh format)
- Remove escape characters

  Files folder image template_bv  
Template engine based on token splitting not regex
Template_bv is a minimalist templating engine that is extremely fast, does not use regular expressions and can easily be extended.

The main idea is based on "splitting" a predefined template at given delimiter marks.

The class splits the template string using the PHP explode function and a configurable token string to find where template variable placeholders are located. By using this method we don't need to use regular expression to locate the template variables.

This template engine would suite someone who likes to embed HTML inside of PHP and not the other way around.

It can assign values to be replaced by placeholder marks, as well as, define values to insert before (prepend) or after (append) those marks.


  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z