CSV Search
PHP: initOptions methods

Send comments on this topic.

Description

this script shall parse the delimiter, and get the row-headers of the CSV file.
such that the options for Fields can be initialized proper.

Contents

getFields

function getFields(
$filename,
$fieldSeparator){
grabs the row-header of the csv file and returns the fields. Parameters:

$filename - name of the file you want to process
$fieldSeparator - field-separator which separates lines into fields.

repairFirstLine

function repairFirstLine(
$filename,
$fieldSeparator,
$infoDelimiter) {
copies .csv.orig to .csv and replaces all evil chars in the first line.

Parameters

$filename - name of the file you want to process.
$fieldSeparator - field-separator which separates lines into fields.
$infoDelimiter - info-delimiter which separates fields.

initOptions

function initOptions() {
initializes the Search Options which are stored in $_SESSION.
executes the csvDelimiter script (csvProcessing/csvDelimiter/csvDelimiterMain)
executes the csvOptions script (csvProcessing/csvOptions/csvOptionsMain)

initOptionsFields

initializes the Field Options.

Created with TwinText