Package Proposal: Text_TSV

From: Date: Sun, 13 Jul 2003 00:41:38 +0000
Subject: Package Proposal: Text_TSV
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18214@lists.php.net to get a copy of this message
Hi, all, I'd like to propose a package for parsing and building blocks of tab-separated text (not files, but text). You can view the docs and download the class here:
    http://ciaweb.net/free/text_tsv.php
Text_TSV parses formatted text blocks into arrays, and converts arrays into TSV-formatted text blocks. It has configurable separators (comma, tab, etc.) and line-endings (\n, \r, etc.). Its main use is to parse TSV text into an array, either sequentially or associatively (the first line is used for the associative key names in that case). I am aware of the many good CSV file readers out there: File_CSV (already in PEAR), Data_CSV in Horde, and of course the native PHP command fgetcsv(). However, all of these work on files and not directly on string variables (at least, so far as I can tell, I know someone will correct me if I'm wrong ;-). I think the Text_TSV functionality would be useful because it work directly with string variables; e.g., one can paste TSV-formatted data (as from Excel) into an HTML form and parse it into an array. Comments, criticism, suggestions, votes? _______________________________________________________________________ Paul M. Jones pjones@ciaweb.net http://ciaweb.net PGP & GnuPG mail accepted. Public key fingerprint: 1F2D 7B8C 3FC2 820F C593 E499 1189 4AEF AA75 78C8 What's the Phorecast? http://phorecast.org/

« previous php.pear.dev (#18214) next »