conroling url variable when reading csv file

From: Date: Sat, 27 Apr 2002 14:51:17 +0000
Subject: conroling url variable when reading csv file
Groups: php.db 
Request: Send a blank email to php-db+get-18847@lists.php.net to get a copy of this message
Hi All i am reading a file named index.csv through a php script i want make a php script such that for example http://www.chida.com/in.php?topic=flu&col=1,2 the php script should read the index.csv and variables fromthe url and display according to it.In the above example it should read csv file and display only the columns 1,2(under topic) of the csv file. could anyone help me with the php code and please suggest me site which has the same type of code snippets. thanks in advance this is the code i have written but it doesnot work propery as i expect <?php $row=r0; $fp = fopen("index.csv","r"); while ($data = fgetcsv($fp,1000)) { $num = count($data); print "fields in line $row: <br>"; $row++; for ( $c=0; $c<$num; $c++ ) ; if($HTTP_GET_VARS['topic'] = "fluent") { print $data[$c] ; } else{ } } fclose($fp); ?> Thanks E.chidambaram ________________________________________________________________________ For live cricket scores download Yahoo! Score Tracker at: http://in.sports.yahoo.com/cricket/tracker.html

« previous php.db (#18847) next »